From: "Dr. David Alan Gilbert" <linux@treblig.org>
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>
---
drivers/parport/share.c | 9 ---------
include/linux/parport.h | 1 -
2 files changed, 10 deletions(-)
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 49c74ded8a53c..7849c25a8967a 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -49,8 +49,6 @@ static DEFINE_SPINLOCK(parportlist_lock);
static LIST_HEAD(all_ports);
static DEFINE_SPINLOCK(full_list_lock);
-static LIST_HEAD(drivers);
-
static DEFINE_MUTEX(registration_lock);
/* 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)
static void attach_driver_chain(struct parport *port)
{
/* 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
@@ -191,10 +185,7 @@ static int driver_detach(struct device_driver *_drv, void *_port)
/* Call detach(port) for each registered driver. */
static void detach_driver_chain(struct parport *port)
{
- struct parport_driver *drv;
/* caller has exclusive registration_lock */
- list_for_each_entry(drv, &drivers, list)
- drv->detach(port);
/*
* call the detach function of the drivers registered in
diff --git a/include/linux/parport.h b/include/linux/parport.h
index fff39bc306290..2a4424b601565 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -258,7 +258,6 @@ struct parport_driver {
int (*probe)(struct pardevice *);
struct device_driver driver;
bool devmodel;
- struct list_head list;
};
#define to_parport_driver(n) container_of(n, struct parport_driver, driver)
--
2.44.0
On Thu, May 02, 2024 at 04:48:21PM +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> 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>
Greg, can you please take the series.
--
Regards
Sudip
* Sudip Mukherjee (Codethink) (sudipm.mukherjee@gmail.com) wrote:
> On Thu, May 02, 2024 at 04:48:21PM +0100, linux@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <linux@treblig.org>
> >
> > 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>
Thanks!
> Greg, can you please take the series.
Dave
> --
> Regards
> Sudip
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
© 2016 - 2025 Red Hat, Inc.