aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-06-06 05:50:56 -0400
committerGuenter Roeck <linux@roeck-us.net>2014-06-12 11:36:49 -0400
commit8dea1b4e7726faf19b66d70f9f3737e85ef04a36 (patch)
treeaa60fd3063d4d4d08fe7b412f9442bd50d5c83c2 /drivers/hwmon
parent1a539d372edd9832444e7a3daa710c444c014dc9 (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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/atxp1.c42
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
46static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END }; 46static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END };
47 47
48static int atxp1_probe(struct i2c_client *client,
49 const struct i2c_device_id *id);
50static int atxp1_remove(struct i2c_client *client);
51static struct atxp1_data *atxp1_update_device(struct device *dev);
52static int atxp1_detect(struct i2c_client *client, struct i2c_board_info *info);
53
54static const struct i2c_device_id atxp1_id[] = {
55 { "atxp1", 0 },
56 { }
57};
58MODULE_DEVICE_TABLE(i2c, atxp1_id);
59
60static 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
72struct atxp1_data { 48struct 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
365static const struct i2c_device_id atxp1_id[] = {
366 { "atxp1", 0 },
367 { }
368};
369MODULE_DEVICE_TABLE(i2c, atxp1_id);
370
371static 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
389module_i2c_driver(atxp1_driver); 383module_i2c_driver(atxp1_driver);