diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-04-29 17:11:39 -0400 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2008-04-29 17:11:39 -0400 |
commit | d2653e92732bd3911feff6bee5e23dbf959381db (patch) | |
tree | fd3a413bc150855a09de29b2d253b7dbeb2705ff /drivers/hwmon/f75375s.c | |
parent | ee56d977423a58b53fd0fc1ef0aca0c9cb564c53 (diff) |
i2c: Add support for device alias names
Based on earlier work by Jon Smirl and Jochen Friedrich.
This patch allows new-style i2c chip drivers to have alias names using
the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this
point, the old i2c driver binding scheme (driver_name/type) is still
supported.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jochen Friedrich <jochen@scram.de>
Cc: Jon Smirl <jonsmirl@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Diffstat (limited to 'drivers/hwmon/f75375s.c')
-rw-r--r-- | drivers/hwmon/f75375s.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c index 1464338e4e11..1f63bab05522 100644 --- a/drivers/hwmon/f75375s.c +++ b/drivers/hwmon/f75375s.c | |||
@@ -117,7 +117,8 @@ struct f75375_data { | |||
117 | static int f75375_attach_adapter(struct i2c_adapter *adapter); | 117 | static int f75375_attach_adapter(struct i2c_adapter *adapter); |
118 | static int f75375_detect(struct i2c_adapter *adapter, int address, int kind); | 118 | static int f75375_detect(struct i2c_adapter *adapter, int address, int kind); |
119 | static int f75375_detach_client(struct i2c_client *client); | 119 | static int f75375_detach_client(struct i2c_client *client); |
120 | static int f75375_probe(struct i2c_client *client); | 120 | static int f75375_probe(struct i2c_client *client, |
121 | const struct i2c_device_id *id); | ||
121 | static int f75375_remove(struct i2c_client *client); | 122 | static int f75375_remove(struct i2c_client *client); |
122 | 123 | ||
123 | static struct i2c_driver f75375_legacy_driver = { | 124 | static struct i2c_driver f75375_legacy_driver = { |
@@ -628,7 +629,8 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, | |||
628 | 629 | ||
629 | } | 630 | } |
630 | 631 | ||
631 | static int f75375_probe(struct i2c_client *client) | 632 | static int f75375_probe(struct i2c_client *client, |
633 | const struct i2c_device_id *id) | ||
632 | { | 634 | { |
633 | struct f75375_data *data = i2c_get_clientdata(client); | 635 | struct f75375_data *data = i2c_get_clientdata(client); |
634 | struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data; | 636 | struct f75375s_platform_data *f75375s_pdata = client->dev.platform_data; |
@@ -748,7 +750,7 @@ static int f75375_detect(struct i2c_adapter *adapter, int address, int kind) | |||
748 | if ((err = i2c_attach_client(client))) | 750 | if ((err = i2c_attach_client(client))) |
749 | goto exit_free; | 751 | goto exit_free; |
750 | 752 | ||
751 | if ((err = f75375_probe(client)) < 0) | 753 | if ((err = f75375_probe(client, NULL)) < 0) |
752 | goto exit_detach; | 754 | goto exit_detach; |
753 | 755 | ||
754 | return 0; | 756 | return 0; |