From: linux@treblig.org
To: sudipm.mukherjee@gmail.com
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
linux-parport@lists.infradead.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 1/3] parport: Remove 'drivers' list
Date: Thu, 2 May 2024 16:48:21 +0100 [thread overview]
Message-ID: <20240502154823.67235-2-linux@treblig.org> (raw)
In-Reply-To: <20240502154823.67235-1-linux@treblig.org>
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
next prev parent reply other threads:[~2024-05-02 16:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 15:48 [PATCH 0/3] parport: Cleanup some pre-devmodel code linux
2024-05-02 15:48 ` linux [this message]
2024-06-30 21:00 ` [PATCH 1/3] parport: Remove 'drivers' list Sudip Mukherjee (Codethink)
2024-06-30 22:46 ` Dr. David Alan Gilbert
2024-05-02 15:48 ` [PATCH 2/3] parport: Remove attach function pointer linux
2024-06-30 21:01 ` Sudip Mukherjee
2024-05-02 15:48 ` [PATCH 3/3] parport: Remove parport_driver.devmodel linux
2024-06-30 21:03 ` Sudip Mukherjee
2024-05-16 10:46 ` [PATCH 0/3] parport: Cleanup some pre-devmodel code Dr. David Alan Gilbert
2024-06-03 17:39 ` Dr. David Alan Gilbert
2024-06-26 15:41 ` Dr. David Alan Gilbert
2024-06-27 8:51 ` Sudip Mukherjee
2024-06-27 11:34 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240502154823.67235-2-linux@treblig.org \
--to=linux@treblig.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parport@lists.infradead.org \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox