diff options
| author | Axel Lin <axel.lin@ingics.com> | 2014-06-06 05:50:56 -0400 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2014-06-12 11:36:49 -0400 |
| commit | 8dea1b4e7726faf19b66d70f9f3737e85ef04a36 (patch) | |
| tree | aa60fd3063d4d4d08fe7b412f9442bd50d5c83c2 | |
| parent | 1a539d372edd9832444e7a3daa710c444c014dc9 (diff) | |
hwmon: (atxp1) Avoid forward declaration
Move atxp1_id and atxp1_driver to proper place to avoid forward declaration.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| -rw-r--r-- | drivers/hwmon/atxp1.c | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c index 6edce42c61d5..2ae8a304b5ef 100644 --- a/drivers/hwmon/atxp1.c +++ b/drivers/hwmon/atxp1.c | |||
| @@ -45,30 +45,6 @@ MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>"); | |||
| 45 | 45 | ||
| 46 | static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END }; | 46 | static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END }; |
| 47 | 47 | ||
| 48 | static int atxp1_probe(struct i2c_client *client, | ||
| 49 | const struct i2c_device_id *id); | ||
| 50 | static int atxp1_remove(struct i2c_client *client); | ||
| 51 | static struct atxp1_data *atxp1_update_device(struct device *dev); | ||
| 52 | static int atxp1_detect(struct i2c_client *client, struct i2c_board_info *info); | ||
| 53 | |||
| 54 | static const struct i2c_device_id atxp1_id[] = { | ||
| 55 | { "atxp1", 0 }, | ||
| 56 | { } | ||
| 57 | }; | ||
| 58 | MODULE_DEVICE_TABLE(i2c, atxp1_id); | ||
| 59 | |||
| 60 | static struct i2c_driver atxp1_driver = { | ||
| 61 | .class = I2C_CLASS_HWMON, | ||
| 62 | .driver = { | ||
| 63 | .name = "atxp1", | ||
| 64 | }, | ||
| 65 | .probe = atxp1_probe, | ||
| 66 | .remove = atxp1_remove, | ||
| 67 | .id_table = atxp1_id, | ||
| 68 | .detect = atxp1_detect, | ||
| 69 | .address_list = normal_i2c, | ||
| 70 | }; | ||
| 71 | |||
| 72 | struct atxp1_data { | 48 | struct atxp1_data { |
| 73 | struct device *hwmon_dev; | 49 | struct device *hwmon_dev; |
| 74 | struct mutex update_lock; | 50 | struct mutex update_lock; |
| @@ -386,4 +362,22 @@ static int atxp1_remove(struct i2c_client *client) | |||
| 386 | return 0; | 362 | return 0; |
| 387 | }; | 363 | }; |
| 388 | 364 | ||
| 365 | static const struct i2c_device_id atxp1_id[] = { | ||
| 366 | { "atxp1", 0 }, | ||
| 367 | { } | ||
| 368 | }; | ||
| 369 | MODULE_DEVICE_TABLE(i2c, atxp1_id); | ||
| 370 | |||
| 371 | static struct i2c_driver atxp1_driver = { | ||
| 372 | .class = I2C_CLASS_HWMON, | ||
| 373 | .driver = { | ||
| 374 | .name = "atxp1", | ||
| 375 | }, | ||
| 376 | .probe = atxp1_probe, | ||
| 377 | .remove = atxp1_remove, | ||
| 378 | .id_table = atxp1_id, | ||
| 379 | .detect = atxp1_detect, | ||
| 380 | .address_list = normal_i2c, | ||
| 381 | }; | ||
| 382 | |||
| 389 | module_i2c_driver(atxp1_driver); | 383 | module_i2c_driver(atxp1_driver); |
