From: Jean Delvare <khali@linux-fr.org>
To: Nathan Lutchansky <lutchann@litech.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
LM Sensors <lm-sensors@lm-sensors.org>, Greg KH <greg@kroah.com>
Subject: Re: [PATCH 2/5] remove attach_adapter from i2c hwmon drivers
Date: Tue, 16 Aug 2005 00:00:54 +0200 [thread overview]
Message-ID: <20050816000054.31543cb9.khali@linux-fr.org> (raw)
In-Reply-To: <20050815175342.GC24959@litech.org>
Hi Nathan,
> Index: linux-2.6.13-rc6+gregkh/drivers/hwmon/atxp1.c
> ===================================================================
> --- linux-2.6.13-rc6+gregkh.orig/drivers/hwmon/atxp1.c
> +++ linux-2.6.13-rc6+gregkh/drivers/hwmon/atxp1.c
> @@ -44,7 +44,6 @@ static unsigned short normal_i2c[] = { 0
>
> I2C_CLIENT_INSMOD_1(atxp1);
>
> -static int atxp1_attach_adapter(struct i2c_adapter * adapter);
> static int atxp1_detach_client(struct i2c_client * client);
> static struct atxp1_data * atxp1_update_device(struct device *dev);
> static int atxp1_detect(struct i2c_adapter *adapter, int address, int
> kind);
> @@ -53,7 +52,8 @@ static struct i2c_driver atxp1_driver =
> .owner = THIS_MODULE,
> .name = "atxp1",
> .flags = I2C_DF_NOTIFY,
> - .attach_adapter = atxp1_attach_adapter,
> + .address_data = &addr_data,
> + .detect_client = atxp1_detect,
> .detach_client = atxp1_detach_client,
> };
>
> @@ -251,11 +251,6 @@ static ssize_t atxp1_storegpio2(struct d
> static DEVICE_ATTR(gpio2, S_IRUGO | S_IWUSR, atxp1_showgpio2,
> atxp1_storegpio2);
>
>
> -static int atxp1_attach_adapter(struct i2c_adapter *adapter)
> -{
> - return i2c_probe(adapter, &addr_data, &atxp1_detect);
> -};
> -
> static int atxp1_detect(struct i2c_adapter *adapter, int address, int
> kind) {
> struct i2c_client * new_client;
> Index: linux-2.6.13-rc6+gregkh/drivers/hwmon/ds1621.c
> ===================================================================
> --- linux-2.6.13-rc6+gregkh.orig/drivers/hwmon/ds1621.c
> +++ linux-2.6.13-rc6+gregkh/drivers/hwmon/ds1621.c
> @@ -80,7 +80,6 @@ struct ds1621_data {
> u8 conf; /* Register encoding, combined */
> };
>
> -static int ds1621_attach_adapter(struct i2c_adapter *adapter);
> static int ds1621_detect(struct i2c_adapter *adapter, int address,
> int kind);
> static void ds1621_init_client(struct i2c_client *client);
> @@ -93,7 +92,8 @@ static struct i2c_driver ds1621_driver =
> .name = "ds1621",
> .id = I2C_DRIVERID_DS1621,
> .flags = I2C_DF_NOTIFY,
> - .attach_adapter = ds1621_attach_adapter,
> + .address_data = &addr_data,
> + .detect_client = ds1621_detect,
> .detach_client = ds1621_detach_client,
> };
>
> @@ -178,12 +178,6 @@ static DEVICE_ATTR(temp1_min, S_IWUSR |
> static DEVICE_ATTR(temp1_max, S_IWUSR | S_IRUGO, show_temp_max,
> set_temp_max);
>
>
> -static int ds1621_attach_adapter(struct i2c_adapter *adapter)
> -{
> - return i2c_probe(adapter, &addr_data, ds1621_detect);
> -}
> -
> -/* This function is called by i2c_probe */
> int ds1621_detect(struct i2c_adapter *adapter, int address,
> int kind)
> {
I noticed that these two drivers do not properly define their .class to
I2C_CLASS_HWMON. I understand that doing so doesn't belong to this
patch, but having an additional patch to apply on top it fixing the
problem would be great. Can you do that? Or I will, it doesn't really
matter (the patch should be really straightforward now.)
Thanks,
--
Jean Delvare
next prev parent reply other threads:[~2005-08-15 22:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-15 17:51 [PATCH 0/5] improve i2c probing Nathan Lutchansky
2005-08-15 17:52 ` [PATCH 1/5] call i2c_probe from i2c core Nathan Lutchansky
2005-08-15 21:55 ` Jean Delvare
2005-08-16 3:14 ` Nathan Lutchansky
2005-08-16 12:13 ` Jean Delvare
2005-08-15 17:53 ` [PATCH 2/5] remove attach_adapter from i2c hwmon drivers Nathan Lutchansky
2005-08-15 22:00 ` Jean Delvare [this message]
2005-08-15 17:54 ` [PATCH 3/5] remove attach_adapter from misc i2c chip drivers Nathan Lutchansky
2005-08-15 17:54 ` [PATCH 4/5] add i2c_probe_device and i2c_remove_device Nathan Lutchansky
2005-08-15 22:14 ` Jean Delvare
2005-08-16 3:33 ` Nathan Lutchansky
2005-08-16 16:38 ` Jean Delvare
2005-08-15 17:55 ` [PATCH 5/5] new flag to disable i2c probing for an adapter Nathan Lutchansky
2005-08-15 21:39 ` [PATCH 0/5] improve i2c probing Jean Delvare
2005-08-16 3:05 ` Nathan Lutchansky
2005-08-16 20:30 ` Jean Delvare
2005-08-18 18:54 ` Greg KH
2005-08-20 0:11 ` Nathan Lutchansky
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=20050816000054.31543cb9.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=lutchann@litech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox