Skip to content

Commit f9a748f

Browse files
Dr. David Alan Gilbertgregkh
authored andcommitted
parport: Remove 'drivers' list
The list has been empty since: 'commit 3275158 ("parport: remove use of devmodel")' This also means we can remove the 'list_head' from struct parport_driver. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Acked-by: Sudip Mukherjee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 2f3fd91 commit f9a748f

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

drivers/parport/share.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ static DEFINE_SPINLOCK(parportlist_lock);
4949
static LIST_HEAD(all_ports);
5050
static DEFINE_SPINLOCK(full_list_lock);
5151

52-
static LIST_HEAD(drivers);
53-
5452
static DEFINE_MUTEX(registration_lock);
5553

5654
/* 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)
165163
static void attach_driver_chain(struct parport *port)
166164
{
167165
/* caller has exclusive registration_lock */
168-
struct parport_driver *drv;
169-
170-
list_for_each_entry(drv, &drivers, list)
171-
drv->attach(port);
172166

173167
/*
174168
* call the driver_check function of the drivers registered in
@@ -191,10 +185,7 @@ static int driver_detach(struct device_driver *_drv, void *_port)
191185
/* Call detach(port) for each registered driver. */
192186
static void detach_driver_chain(struct parport *port)
193187
{
194-
struct parport_driver *drv;
195188
/* caller has exclusive registration_lock */
196-
list_for_each_entry(drv, &drivers, list)
197-
drv->detach(port);
198189

199190
/*
200191
* call the detach function of the drivers registered in

include/linux/parport.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ struct parport_driver {
258258
int (*probe)(struct pardevice *);
259259
struct device_driver driver;
260260
bool devmodel;
261-
struct list_head list;
262261
};
263262

264263
#define to_parport_driver(n) container_of(n, struct parport_driver, driver)

0 commit comments

Comments
 (0)