Commit b05596c2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge kroah.com:/home/greg/linux/BK/bleed-2.5

into kroah.com:/home/greg/linux/BK/i2c-2.6
parents 15902084 bfcfbcc1
...@@ -779,10 +779,6 @@ int i2c_iic_add_bus(struct i2c_adapter *adap) ...@@ -779,10 +779,6 @@ int i2c_iic_add_bus(struct i2c_adapter *adap)
adap->retries = 3; /* be replaced by defines */ adap->retries = 3; /* be replaced by defines */
adap->flags = 0; adap->flags = 0;
#ifdef MODULE
MOD_INC_USE_COUNT;
#endif
i2c_add_adapter(adap); i2c_add_adapter(adap);
iic_init(iic_adap); iic_init(iic_adap);
...@@ -815,9 +811,6 @@ int i2c_iic_del_bus(struct i2c_adapter *adap) ...@@ -815,9 +811,6 @@ int i2c_iic_del_bus(struct i2c_adapter *adap)
return res; return res;
DEB2(printk("i2c-algo-ite: adapter unregistered: %s\n",adap->name)); DEB2(printk("i2c-algo-ite: adapter unregistered: %s\n",adap->name));
#ifdef MODULE
MOD_DEC_USE_COUNT;
#endif
return 0; return 0;
} }
......
...@@ -422,9 +422,11 @@ sysfs_in_offsets(7); ...@@ -422,9 +422,11 @@ sysfs_in_offsets(7);
sysfs_in_offsets(8); sysfs_in_offsets(8);
#define device_create_file_in(client, offset) \ #define device_create_file_in(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_in_input##offset); \ device_create_file(&client->dev, &dev_attr_in_input##offset); \
device_create_file(&client->dev, &dev_attr_in_min##offset); \ device_create_file(&client->dev, &dev_attr_in_min##offset); \
device_create_file(&client->dev, &dev_attr_in_max##offset); device_create_file(&client->dev, &dev_attr_in_max##offset); \
} while (0)
#define show_fan_reg(reg) \ #define show_fan_reg(reg) \
static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ static ssize_t show_##reg (struct device *dev, char *buf, int nr) \
...@@ -482,8 +484,10 @@ sysfs_fan_offset(3); ...@@ -482,8 +484,10 @@ sysfs_fan_offset(3);
sysfs_fan_min_offset(3); sysfs_fan_min_offset(3);
#define device_create_file_fan(client, offset) \ #define device_create_file_fan(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_fan_input##offset); \ device_create_file(&client->dev, &dev_attr_fan_input##offset); \
device_create_file(&client->dev, &dev_attr_fan_min##offset); \ device_create_file(&client->dev, &dev_attr_fan_min##offset); \
} while (0)
#define show_temp_reg(reg) \ #define show_temp_reg(reg) \
static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ static ssize_t show_##reg (struct device *dev, char *buf, int nr) \
...@@ -566,9 +570,11 @@ sysfs_temp_offsets(2); ...@@ -566,9 +570,11 @@ sysfs_temp_offsets(2);
sysfs_temp_offsets(3); sysfs_temp_offsets(3);
#define device_create_file_temp(client, offset) \ #define device_create_file_temp(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_temp_input##offset); \ device_create_file(&client->dev, &dev_attr_temp_input##offset); \
device_create_file(&client->dev, &dev_attr_temp_max##offset); \ device_create_file(&client->dev, &dev_attr_temp_max##offset); \
device_create_file(&client->dev, &dev_attr_temp_min##offset); device_create_file(&client->dev, &dev_attr_temp_min##offset); \
} while (0)
static ssize_t static ssize_t
show_vid_reg(struct device *dev, char *buf) show_vid_reg(struct device *dev, char *buf)
...@@ -691,8 +697,10 @@ sysfs_beep(ENABLE, enable); ...@@ -691,8 +697,10 @@ sysfs_beep(ENABLE, enable);
sysfs_beep(MASK, mask); sysfs_beep(MASK, mask);
#define device_create_file_beep(client) \ #define device_create_file_beep(client) \
do { \
device_create_file(&client->dev, &dev_attr_beep_enable); \ device_create_file(&client->dev, &dev_attr_beep_enable); \
device_create_file(&client->dev, &dev_attr_beep_mask); device_create_file(&client->dev, &dev_attr_beep_mask); \
} while (0)
/* w83697hf only has two fans */ /* w83697hf only has two fans */
static ssize_t static ssize_t
...@@ -769,7 +777,9 @@ sysfs_fan_div(2); ...@@ -769,7 +777,9 @@ sysfs_fan_div(2);
sysfs_fan_div(3); sysfs_fan_div(3);
#define device_create_file_fan_div(client, offset) \ #define device_create_file_fan_div(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_fan_div##offset); \ device_create_file(&client->dev, &dev_attr_fan_div##offset); \
} while (0)
/* w83697hf only has two fans */ /* w83697hf only has two fans */
static ssize_t static ssize_t
...@@ -881,10 +891,14 @@ sysfs_pwm(3); ...@@ -881,10 +891,14 @@ sysfs_pwm(3);
sysfs_pwm(4); sysfs_pwm(4);
#define device_create_file_pwm(client, offset) \ #define device_create_file_pwm(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_pwm##offset); \ device_create_file(&client->dev, &dev_attr_pwm##offset); \
} while (0)
#define device_create_file_pwmenable(client, offset) \ #define device_create_file_pwmenable(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_pwm_enable##offset); \ device_create_file(&client->dev, &dev_attr_pwm_enable##offset); \
} while (0)
static ssize_t static ssize_t
show_sensor_reg(struct device *dev, char *buf, int nr) show_sensor_reg(struct device *dev, char *buf, int nr)
...@@ -957,7 +971,9 @@ sysfs_sensor(2); ...@@ -957,7 +971,9 @@ sysfs_sensor(2);
sysfs_sensor(3); sysfs_sensor(3);
#define device_create_file_sensor(client, offset) \ #define device_create_file_sensor(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_sensor##offset); \ device_create_file(&client->dev, &dev_attr_sensor##offset); \
} while (0)
#ifdef W83781D_RT #ifdef W83781D_RT
static ssize_t static ssize_t
...@@ -1016,7 +1032,9 @@ sysfs_rt(2); ...@@ -1016,7 +1032,9 @@ sysfs_rt(2);
sysfs_rt(3); sysfs_rt(3);
#define device_create_file_rt(client, offset) \ #define device_create_file_rt(client, offset) \
do { \
device_create_file(&client->dev, &dev_attr_rt##offset); \ device_create_file(&client->dev, &dev_attr_rt##offset); \
} while (0)
#endif /* ifdef W83781D_RT */ #endif /* ifdef W83781D_RT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment