Commit f9a748fa authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Greg Kroah-Hartman

parport: Remove 'drivers' list

The list has been empty since:
 'commit 3275158f ("parport: remove use of devmodel")'

This also means we can remove the 'list_head' from
struct parport_driver.
Signed-off-by: default avatarDr. David Alan Gilbert <linux@treblig.org>
Acked-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20240502154823.67235-2-linux@treblig.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2f3fd91b
...@@ -49,8 +49,6 @@ static DEFINE_SPINLOCK(parportlist_lock); ...@@ -49,8 +49,6 @@ static DEFINE_SPINLOCK(parportlist_lock);
static LIST_HEAD(all_ports); static LIST_HEAD(all_ports);
static DEFINE_SPINLOCK(full_list_lock); static DEFINE_SPINLOCK(full_list_lock);
static LIST_HEAD(drivers);
static DEFINE_MUTEX(registration_lock); static DEFINE_MUTEX(registration_lock);
/* What you can do to a port that's gone away.. */ /* What you can do to a port that's gone away.. */
...@@ -165,10 +163,6 @@ static int driver_check(struct device_driver *dev_drv, void *_port) ...@@ -165,10 +163,6 @@ static int driver_check(struct device_driver *dev_drv, void *_port)
static void attach_driver_chain(struct parport *port) static void attach_driver_chain(struct parport *port)
{ {
/* caller has exclusive registration_lock */ /* caller has exclusive registration_lock */
struct parport_driver *drv;
list_for_each_entry(drv, &drivers, list)
drv->attach(port);
/* /*
* call the driver_check function of the drivers registered in * call the driver_check function of the drivers registered in
...@@ -191,10 +185,7 @@ static int driver_detach(struct device_driver *_drv, void *_port) ...@@ -191,10 +185,7 @@ static int driver_detach(struct device_driver *_drv, void *_port)
/* Call detach(port) for each registered driver. */ /* Call detach(port) for each registered driver. */
static void detach_driver_chain(struct parport *port) static void detach_driver_chain(struct parport *port)
{ {
struct parport_driver *drv;
/* caller has exclusive registration_lock */ /* caller has exclusive registration_lock */
list_for_each_entry(drv, &drivers, list)
drv->detach(port);
/* /*
* call the detach function of the drivers registered in * call the detach function of the drivers registered in
......
...@@ -258,7 +258,6 @@ struct parport_driver { ...@@ -258,7 +258,6 @@ struct parport_driver {
int (*probe)(struct pardevice *); int (*probe)(struct pardevice *);
struct device_driver driver; struct device_driver driver;
bool devmodel; bool devmodel;
struct list_head list;
}; };
#define to_parport_driver(n) container_of(n, struct parport_driver, driver) #define to_parport_driver(n) container_of(n, struct parport_driver, driver)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment