Skip to content

Commit

Permalink
eeepc-laptop: rename _set and _get arguments in macro
Browse files Browse the repository at this point in the history
The _set and _get arguments to the EEEPC_CREATE_SENSOR_ATTR() macro
are confusingly named: _set should be _get and vice versa. Rename these
arguments.

Drop the trailing semicolon from that macro, while we're at it.

Signed-off-by: Paul Bolle <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
  • Loading branch information
pebolle authored and Matthew Garrett committed Aug 16, 2014
1 parent c4960cf commit 1ec9d39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1053,20 +1053,20 @@ static ssize_t show_sys_hwmon(int (*get)(void), char *buf)
return sprintf(buf, "%d\n", get());
}

#define EEEPC_CREATE_SENSOR_ATTR(_name, _mode, _set, _get) \
#define EEEPC_CREATE_SENSOR_ATTR(_name, _mode, _get, _set) \
static ssize_t show_##_name(struct device *dev, \
struct device_attribute *attr, \
char *buf) \
{ \
return show_sys_hwmon(_set, buf); \
return show_sys_hwmon(_get, buf); \
} \
static ssize_t store_##_name(struct device *dev, \
struct device_attribute *attr, \
const char *buf, size_t count) \
{ \
return store_sys_hwmon(_get, buf, count); \
return store_sys_hwmon(_set, buf, count); \
} \
static DEVICE_ATTR(_name, _mode, show_##_name, store_##_name);
static DEVICE_ATTR(_name, _mode, show_##_name, store_##_name)

EEEPC_CREATE_SENSOR_ATTR(fan1_input, S_IRUGO, eeepc_get_fan_rpm, NULL);
EEEPC_CREATE_SENSOR_ATTR(pwm1, S_IRUGO | S_IWUSR,
Expand Down

0 comments on commit 1ec9d39

Please sign in to comment.