From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: David Brownell
<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: [PATCH 6/6] i2c: Kill the redundant client list
Date: Sat, 2 May 2009 11:45:11 +0200 [thread overview]
Message-ID: <20090502114511.3d331eda@hyperion.delvare> (raw)
In-Reply-To: <20090502113856.39940f1e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
We used to maintain our own per-adapter list of i2c clients, but this
is redundant with what the driver core does, and no longer needed.
Just drop the redundant list.
Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
---
drivers/i2c/i2c-core.c | 12 ------------
include/linux/i2c.h | 4 ----
2 files changed, 16 deletions(-)
--- linux-2.6.30-rc4.orig/drivers/i2c/i2c-core.c 2009-04-30 14:33:14.000000000 +0200
+++ linux-2.6.30-rc4/drivers/i2c/i2c-core.c 2009-04-30 15:35:30.000000000 +0200
@@ -281,10 +281,6 @@ i2c_new_device(struct i2c_adapter *adap,
if (status)
goto out_err;
- mutex_lock(&adap->clist_lock);
- list_add_tail(&client->list, &adap->clients);
- mutex_unlock(&adap->clist_lock);
-
dev_dbg(&adap->dev, "client [%s] registered with bus id %s\n",
client->name, dev_name(&client->dev));
@@ -306,12 +302,6 @@ EXPORT_SYMBOL_GPL(i2c_new_device);
*/
void i2c_unregister_device(struct i2c_client *client)
{
- struct i2c_adapter *adapter = client->adapter;
-
- mutex_lock(&adapter->clist_lock);
- list_del(&client->list);
- mutex_unlock(&adapter->clist_lock);
-
device_unregister(&client->dev);
}
EXPORT_SYMBOL_GPL(i2c_unregister_device);
@@ -437,8 +427,6 @@ static int i2c_register_adapter(struct i
return -EAGAIN;
mutex_init(&adap->bus_lock);
- mutex_init(&adap->clist_lock);
- INIT_LIST_HEAD(&adap->clients);
mutex_lock(&core_lock);
--- linux-2.6.30-rc4.orig/include/linux/i2c.h 2009-04-30 14:34:30.000000000 +0200
+++ linux-2.6.30-rc4/include/linux/i2c.h 2009-04-30 15:34:44.000000000 +0200
@@ -178,7 +178,6 @@ struct i2c_driver {
* @driver: device's driver, hence pointer to access routines
* @dev: Driver model device node for the slave.
* @irq: indicates the IRQ generated by this device (if any)
- * @list: list of active/busy clients (DEPRECATED)
* @detected: member of an i2c_driver.clients list
*
* An i2c_client identifies a single device (i.e. chip) connected to an
@@ -195,7 +194,6 @@ struct i2c_client {
struct i2c_driver *driver; /* and our access routines */
struct device dev; /* the device structure */
int irq; /* irq issued by device */
- struct list_head list; /* DEPRECATED */
struct list_head detected;
};
#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
@@ -339,14 +337,12 @@ struct i2c_adapter {
/* data fields that are valid for all devices */
u8 level; /* nesting level for lockdep */
struct mutex bus_lock;
- struct mutex clist_lock;
int timeout; /* in jiffies */
int retries;
struct device dev; /* the adapter device */
int nr;
- struct list_head clients; /* DEPRECATED */
char name[48];
struct completion dev_released;
};
--
Jean Delvare
next prev parent reply other threads:[~2009-05-02 9:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-02 9:38 [PATCH 0/6] i2c: Get rid of the legacy binding model Jean Delvare
[not found] ` <20090502113856.39940f1e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-05-02 9:39 ` [PATCH 1/6] i2c: Kill client_register and client_unregister methods Jean Delvare
2009-05-02 9:40 ` [PATCH 2/6] i2c: Get rid of the legacy binding model Jean Delvare
[not found] ` <20090502114020.41c38247-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-05-02 19:03 ` David Brownell
[not found] ` <200905021203.43974.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-05-03 7:25 ` Jean Delvare
2009-05-02 9:41 ` [PATCH 3/6] i2c: Drop i2c_probe function Jean Delvare
2009-05-02 9:42 ` [PATCH 4/6] i2c: Merge i2c_attach_client into i2c_new_device Jean Delvare
2009-05-02 9:43 ` [PATCH 5/6] i2c: Kill is_newstyle_driver Jean Delvare
2009-05-02 9:45 ` Jean Delvare [this message]
2009-05-02 18:16 ` [PATCH 0/6] i2c: Get rid of the legacy binding model David Brownell
2009-05-02 19:14 ` David Brownell
[not found] ` <200905021214.02937.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-05-03 7:05 ` Jean Delvare
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=20090502114511.3d331eda@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.