mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] Driver Core: drivers/i2c/chips/w83781d.c - drivers/s390/block/dcssblk.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a5099cfc2e
commit
e404e274f6
24 changed files with 100 additions and 99 deletions
|
|
@ -455,21 +455,22 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr,
|
|||
* pass around to the attribute functions, so we don't really have
|
||||
* choice but implement a bunch of them...
|
||||
*
|
||||
* FIXME, it does now...
|
||||
*/
|
||||
#define BUILD_SHOW_FUNC_INT(name, data) \
|
||||
static ssize_t show_##name(struct device *dev, char *buf) \
|
||||
static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
|
||||
{ \
|
||||
return sprintf(buf, "%d\n", data); \
|
||||
}
|
||||
|
||||
#define BUILD_SHOW_FUNC_STR(name, data) \
|
||||
static ssize_t show_##name(struct device *dev, char *buf) \
|
||||
static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
|
||||
{ \
|
||||
return sprintf(buf, "%s\n", data); \
|
||||
}
|
||||
|
||||
#define BUILD_SHOW_FUNC_FAN(name, data) \
|
||||
static ssize_t show_##name(struct device *dev, char *buf) \
|
||||
static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
|
||||
{ \
|
||||
return sprintf(buf, "%d (%d rpm)\n", \
|
||||
thermostat->last_speed[data], \
|
||||
|
|
@ -478,7 +479,7 @@ static ssize_t show_##name(struct device *dev, char *buf) \
|
|||
}
|
||||
|
||||
#define BUILD_STORE_FUNC_DEG(name, data) \
|
||||
static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \
|
||||
static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \
|
||||
{ \
|
||||
int val; \
|
||||
int i; \
|
||||
|
|
@ -491,7 +492,7 @@ static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \
|
|||
}
|
||||
|
||||
#define BUILD_STORE_FUNC_INT(name, data) \
|
||||
static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \
|
||||
static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \
|
||||
{ \
|
||||
u32 val; \
|
||||
val = simple_strtoul(buf, NULL, 10); \
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ static void fetch_cpu_pumps_minmax(void)
|
|||
* the input twice... I accept patches :)
|
||||
*/
|
||||
#define BUILD_SHOW_FUNC_FIX(name, data) \
|
||||
static ssize_t show_##name(struct device *dev, char *buf) \
|
||||
static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
|
||||
{ \
|
||||
ssize_t r; \
|
||||
down(&driver_lock); \
|
||||
|
|
@ -694,7 +694,7 @@ static ssize_t show_##name(struct device *dev, char *buf) \
|
|||
return r; \
|
||||
}
|
||||
#define BUILD_SHOW_FUNC_INT(name, data) \
|
||||
static ssize_t show_##name(struct device *dev, char *buf) \
|
||||
static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
|
||||
{ \
|
||||
return sprintf(buf, "%d", data); \
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,13 +107,13 @@ print_temp( const char *s, int temp )
|
|||
}
|
||||
|
||||
static ssize_t
|
||||
show_cpu_temperature( struct device *dev, char *buf )
|
||||
show_cpu_temperature( struct device *dev, struct device_attribute *attr, char *buf )
|
||||
{
|
||||
return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 );
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
show_case_temperature( struct device *dev, char *buf )
|
||||
show_case_temperature( struct device *dev, struct device_attribute *attr, char *buf )
|
||||
{
|
||||
return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue