Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2383
b: refs/heads/master
c: 30f7429
h: refs/heads/master
i:
  2381: 993c90b
  2379: e13fb50
  2375: f41ed7b
  2367: a37675d
v: v3
  • Loading branch information
Yani Ioannou authored and Greg Kroah-Hartman committed Jun 20, 2005
1 parent d08c454 commit 41462e3
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 110 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74880c063b06efd103c924abfe19d9d8fa4864c4
refs/heads/master: 30f74292e50d6c4ae438dbee5cb45d77bf774351
44 changes: 22 additions & 22 deletions trunk/drivers/i2c/chips/adm1031.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,11 @@ set_fan_auto_channel(struct device *dev, const char *buf, size_t count, int nr)
}

#define fan_auto_channel_offset(offset) \
static ssize_t show_fan_auto_channel_##offset (struct device *dev, char *buf) \
static ssize_t show_fan_auto_channel_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan_auto_channel(dev, buf, offset - 1); \
} \
static ssize_t set_fan_auto_channel_##offset (struct device *dev, \
static ssize_t set_fan_auto_channel_##offset (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_fan_auto_channel(dev, buf, count, offset - 1); \
Expand Down Expand Up @@ -357,24 +357,24 @@ set_auto_temp_max(struct device *dev, const char *buf, size_t count, int nr)
}

#define auto_temp_reg(offset) \
static ssize_t show_auto_temp_##offset##_off (struct device *dev, char *buf) \
static ssize_t show_auto_temp_##offset##_off (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_auto_temp_off(dev, buf, offset - 1); \
} \
static ssize_t show_auto_temp_##offset##_min (struct device *dev, char *buf) \
static ssize_t show_auto_temp_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_auto_temp_min(dev, buf, offset - 1); \
} \
static ssize_t show_auto_temp_##offset##_max (struct device *dev, char *buf) \
static ssize_t show_auto_temp_##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_auto_temp_max(dev, buf, offset - 1); \
} \
static ssize_t set_auto_temp_##offset##_min (struct device *dev, \
static ssize_t set_auto_temp_##offset##_min (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_auto_temp_min(dev, buf, count, offset - 1); \
} \
static ssize_t set_auto_temp_##offset##_max (struct device *dev, \
static ssize_t set_auto_temp_##offset##_max (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_auto_temp_max(dev, buf, count, offset - 1); \
Expand Down Expand Up @@ -421,11 +421,11 @@ set_pwm(struct device *dev, const char *buf, size_t count, int nr)
}

#define pwm_reg(offset) \
static ssize_t show_pwm_##offset (struct device *dev, char *buf) \
static ssize_t show_pwm_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_pwm(dev, buf, offset - 1); \
} \
static ssize_t set_pwm_##offset (struct device *dev, \
static ssize_t set_pwm_##offset (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_pwm(dev, buf, count, offset - 1); \
Expand Down Expand Up @@ -557,24 +557,24 @@ set_fan_div(struct device *dev, const char *buf, size_t count, int nr)
}

#define fan_offset(offset) \
static ssize_t show_fan_##offset (struct device *dev, char *buf) \
static ssize_t show_fan_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan(dev, buf, offset - 1); \
} \
static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \
static ssize_t show_fan_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan_min(dev, buf, offset - 1); \
} \
static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \
static ssize_t show_fan_##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan_div(dev, buf, offset - 1); \
} \
static ssize_t set_fan_##offset##_min (struct device *dev, \
static ssize_t set_fan_##offset##_min (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_fan_min(dev, buf, count, offset - 1); \
} \
static ssize_t set_fan_##offset##_div (struct device *dev, \
static ssize_t set_fan_##offset##_div (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_fan_div(dev, buf, count, offset - 1); \
Expand Down Expand Up @@ -667,33 +667,33 @@ set_temp_crit(struct device *dev, const char *buf, size_t count, int nr)
}

#define temp_reg(offset) \
static ssize_t show_temp_##offset (struct device *dev, char *buf) \
static ssize_t show_temp_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp(dev, buf, offset - 1); \
} \
static ssize_t show_temp_##offset##_min (struct device *dev, char *buf) \
static ssize_t show_temp_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp_min(dev, buf, offset - 1); \
} \
static ssize_t show_temp_##offset##_max (struct device *dev, char *buf) \
static ssize_t show_temp_##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp_max(dev, buf, offset - 1); \
} \
static ssize_t show_temp_##offset##_crit (struct device *dev, char *buf) \
static ssize_t show_temp_##offset##_crit (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp_crit(dev, buf, offset - 1); \
} \
static ssize_t set_temp_##offset##_min (struct device *dev, \
static ssize_t set_temp_##offset##_min (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_temp_min(dev, buf, count, offset - 1); \
} \
static ssize_t set_temp_##offset##_max (struct device *dev, \
static ssize_t set_temp_##offset##_max (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_temp_max(dev, buf, count, offset - 1); \
} \
static ssize_t set_temp_##offset##_crit (struct device *dev, \
static ssize_t set_temp_##offset##_crit (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_temp_crit(dev, buf, count, offset - 1); \
Expand All @@ -712,7 +712,7 @@ temp_reg(2);
temp_reg(3);

/* Alarms */
static ssize_t show_alarms(struct device *dev, char *buf)
static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
{
struct adm1031_data *data = adm1031_update_device(dev);
return sprintf(buf, "%d\n", data->alarm);
Expand Down
46 changes: 23 additions & 23 deletions trunk/drivers/i2c/chips/asb100.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,28 +260,28 @@ set_in_reg(MAX, max)

#define sysfs_in(offset) \
static ssize_t \
show_in##offset (struct device *dev, char *buf) \
show_in##offset (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_in(dev, buf, offset); \
} \
static DEVICE_ATTR(in##offset##_input, S_IRUGO, \
show_in##offset, NULL); \
static ssize_t \
show_in##offset##_min (struct device *dev, char *buf) \
show_in##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_in_min(dev, buf, offset); \
} \
static ssize_t \
show_in##offset##_max (struct device *dev, char *buf) \
show_in##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_in_max(dev, buf, offset); \
} \
static ssize_t set_in##offset##_min (struct device *dev, \
static ssize_t set_in##offset##_min (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_in_min(dev, buf, count, offset); \
} \
static ssize_t set_in##offset##_max (struct device *dev, \
static ssize_t set_in##offset##_max (struct device *dev, struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return set_in_max(dev, buf, count, offset); \
Expand Down Expand Up @@ -389,24 +389,24 @@ static ssize_t set_fan_div(struct device *dev, const char *buf,
}

#define sysfs_fan(offset) \
static ssize_t show_fan##offset(struct device *dev, char *buf) \
static ssize_t show_fan##offset(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan(dev, buf, offset - 1); \
} \
static ssize_t show_fan##offset##_min(struct device *dev, char *buf) \
static ssize_t show_fan##offset##_min(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan_min(dev, buf, offset - 1); \
} \
static ssize_t show_fan##offset##_div(struct device *dev, char *buf) \
static ssize_t show_fan##offset##_div(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_fan_div(dev, buf, offset - 1); \
} \
static ssize_t set_fan##offset##_min(struct device *dev, const char *buf, \
static ssize_t set_fan##offset##_min(struct device *dev, struct device_attribute *attr, const char *buf, \
size_t count) \
{ \
return set_fan_min(dev, buf, count, offset - 1); \
} \
static ssize_t set_fan##offset##_div(struct device *dev, const char *buf, \
static ssize_t set_fan##offset##_div(struct device *dev, struct device_attribute *attr, const char *buf, \
size_t count) \
{ \
return set_fan_div(dev, buf, count, offset - 1); \
Expand Down Expand Up @@ -482,27 +482,27 @@ set_temp_reg(MAX, temp_max);
set_temp_reg(HYST, temp_hyst);

#define sysfs_temp(num) \
static ssize_t show_temp##num(struct device *dev, char *buf) \
static ssize_t show_temp##num(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp(dev, buf, num-1); \
} \
static DEVICE_ATTR(temp##num##_input, S_IRUGO, show_temp##num, NULL); \
static ssize_t show_temp_max##num(struct device *dev, char *buf) \
static ssize_t show_temp_max##num(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp_max(dev, buf, num-1); \
} \
static ssize_t set_temp_max##num(struct device *dev, const char *buf, \
static ssize_t set_temp_max##num(struct device *dev, struct device_attribute *attr, const char *buf, \
size_t count) \
{ \
return set_temp_max(dev, buf, count, num-1); \
} \
static DEVICE_ATTR(temp##num##_max, S_IRUGO | S_IWUSR, \
show_temp_max##num, set_temp_max##num); \
static ssize_t show_temp_hyst##num(struct device *dev, char *buf) \
static ssize_t show_temp_hyst##num(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
return show_temp_hyst(dev, buf, num-1); \
} \
static ssize_t set_temp_hyst##num(struct device *dev, const char *buf, \
static ssize_t set_temp_hyst##num(struct device *dev, struct device_attribute *attr, const char *buf, \
size_t count) \
{ \
return set_temp_hyst(dev, buf, count, num-1); \
Expand All @@ -522,7 +522,7 @@ sysfs_temp(4);
device_create_file(&client->dev, &dev_attr_temp##num##_max_hyst); \
} while (0)

static ssize_t show_vid(struct device *dev, char *buf)
static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
{
struct asb100_data *data = asb100_update_device(dev);
return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
Expand All @@ -533,13 +533,13 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
device_create_file(&client->dev, &dev_attr_cpu0_vid)

/* VRM */
static ssize_t show_vrm(struct device *dev, char *buf)
static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
{
struct asb100_data *data = asb100_update_device(dev);
return sprintf(buf, "%d\n", data->vrm);
}

static ssize_t set_vrm(struct device *dev, const char *buf, size_t count)
static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct asb100_data *data = i2c_get_clientdata(client);
Expand All @@ -553,7 +553,7 @@ static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm);
#define device_create_file_vrm(client) \
device_create_file(&client->dev, &dev_attr_vrm);

static ssize_t show_alarms(struct device *dev, char *buf)
static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
{
struct asb100_data *data = asb100_update_device(dev);
return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->alarms));
Expand All @@ -564,13 +564,13 @@ static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
device_create_file(&client->dev, &dev_attr_alarms)

/* 1 PWM */
static ssize_t show_pwm1(struct device *dev, char *buf)
static ssize_t show_pwm1(struct device *dev, struct device_attribute *attr, char *buf)
{
struct asb100_data *data = asb100_update_device(dev);
return sprintf(buf, "%d\n", ASB100_PWM_FROM_REG(data->pwm & 0x0f));
}

static ssize_t set_pwm1(struct device *dev, const char *buf, size_t count)
static ssize_t set_pwm1(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
struct asb100_data *data = i2c_get_clientdata(client);
Expand All @@ -584,13 +584,13 @@ static ssize_t set_pwm1(struct device *dev, const char *buf, size_t count)
return count;
}

static ssize_t show_pwm_enable1(struct device *dev, char *buf)
static ssize_t show_pwm_enable1(struct device *dev, struct device_attribute *attr, char *buf)
{
struct asb100_data *data = asb100_update_device(dev);
return sprintf(buf, "%d\n", (data->pwm & 0x80) ? 1 : 0);
}

static ssize_t set_pwm_enable1(struct device *dev, const char *buf,
static ssize_t set_pwm_enable1(struct device *dev, struct device_attribute *attr, const char *buf,
size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/i2c/chips/ds1621.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ static void ds1621_init_client(struct i2c_client *client)
}

#define show(value) \
static ssize_t show_##value(struct device *dev, char *buf) \
static ssize_t show_##value(struct device *dev, struct device_attribute *attr, char *buf) \
{ \
struct ds1621_data *data = ds1621_update_client(dev); \
return sprintf(buf, "%d\n", LM75_TEMP_FROM_REG(data->value)); \
Expand All @@ -148,7 +148,7 @@ show(temp_min);
show(temp_max);

#define set_temp(suffix, value, reg) \
static ssize_t set_temp_##suffix(struct device *dev, const char *buf, \
static ssize_t set_temp_##suffix(struct device *dev, struct device_attribute *attr, const char *buf, \
size_t count) \
{ \
struct i2c_client *client = to_i2c_client(dev); \
Expand All @@ -165,7 +165,7 @@ static ssize_t set_temp_##suffix(struct device *dev, const char *buf, \
set_temp(min, temp_min, DS1621_REG_TEMP_MIN);
set_temp(max, temp_max, DS1621_REG_TEMP_MAX);

static ssize_t show_alarms(struct device *dev, char *buf)
static ssize_t show_alarms(struct device *dev, struct device_attribute *attr, char *buf)
{
struct ds1621_data *data = ds1621_update_client(dev);
return sprintf(buf, "%d\n", ALARMS_FROM_REG(data->conf));
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/i2c/chips/fscher.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,17 @@ struct fscher_data {

#define sysfs_r(kind, sub, offset, reg) \
static ssize_t show_##kind##sub (struct fscher_data *, char *, int); \
static ssize_t show_##kind##offset##sub (struct device *, char *); \
static ssize_t show_##kind##offset##sub (struct device *dev, char *buf) \
static ssize_t show_##kind##offset##sub (struct device *, struct device_attribute *attr, char *); \
static ssize_t show_##kind##offset##sub (struct device *dev, struct device_attribute *attr, char *buf) \
{ \
struct fscher_data *data = fscher_update_device(dev); \
return show_##kind##sub(data, buf, (offset)); \
}

#define sysfs_w(kind, sub, offset, reg) \
static ssize_t set_##kind##sub (struct i2c_client *, struct fscher_data *, const char *, size_t, int, int); \
static ssize_t set_##kind##offset##sub (struct device *, const char *, size_t); \
static ssize_t set_##kind##offset##sub (struct device *dev, const char *buf, size_t count) \
static ssize_t set_##kind##offset##sub (struct device *, struct device_attribute *attr, const char *, size_t); \
static ssize_t set_##kind##offset##sub (struct device *dev, struct device_attribute *attr, const char *buf, size_t count) \
{ \
struct i2c_client *client = to_i2c_client(dev); \
struct fscher_data *data = i2c_get_clientdata(client); \
Expand Down
Loading

0 comments on commit 41462e3

Please sign in to comment.