Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parport: Remove 'drivers' list

The list has been empty since:
'commit 3275158fa52a ("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 <linux@treblig.org>
Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Link: https://lore.kernel.org/r/20240502154823.67235-2-linux@treblig.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dr. David Alan Gilbert and committed by
Greg Kroah-Hartman
f9a748fa 2f3fd91b

-10
-9
drivers/parport/share.c
··· 49 49 static LIST_HEAD(all_ports); 50 50 static DEFINE_SPINLOCK(full_list_lock); 51 51 52 - static LIST_HEAD(drivers); 53 - 54 52 static DEFINE_MUTEX(registration_lock); 55 53 56 54 /* What you can do to a port that's gone away.. */ ··· 163 165 static void attach_driver_chain(struct parport *port) 164 166 { 165 167 /* caller has exclusive registration_lock */ 166 - struct parport_driver *drv; 167 - 168 - list_for_each_entry(drv, &drivers, list) 169 - drv->attach(port); 170 168 171 169 /* 172 170 * call the driver_check function of the drivers registered in ··· 185 191 /* Call detach(port) for each registered driver. */ 186 192 static void detach_driver_chain(struct parport *port) 187 193 { 188 - struct parport_driver *drv; 189 194 /* caller has exclusive registration_lock */ 190 - list_for_each_entry(drv, &drivers, list) 191 - drv->detach(port); 192 195 193 196 /* 194 197 * call the detach function of the drivers registered in
-1
include/linux/parport.h
··· 258 258 int (*probe)(struct pardevice *); 259 259 struct device_driver driver; 260 260 bool devmodel; 261 - struct list_head list; 262 261 }; 263 262 264 263 #define to_parport_driver(n) container_of(n, struct parport_driver, driver)