aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorYani Ioannou <yani.ioannou@gmail.com>2005-05-17 06:42:58 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:34 -0400
commite404e274f62665f3333d6a539d0d3701f678a598 (patch)
treeef6618291524edaab45c4123274730c7d57ae852 /drivers/macintosh
parenta5099cfc2e82240b0a3e72ad79a5969d5af1a7dc (diff)
[PATCH] Driver Core: drivers/i2c/chips/w83781d.c - drivers/s390/block/dcssblk.c: update device attribute callbacks
Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/therm_adt746x.c11
-rw-r--r--drivers/macintosh/therm_pm72.c4
-rw-r--r--drivers/macintosh/therm_windtunnel.c4
3 files changed, 10 insertions, 9 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index d09308f30960..5ba190ce14a0 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -455,21 +455,22 @@ static int attach_one_thermostat(struct i2c_adapter *adapter, int addr,
455 * pass around to the attribute functions, so we don't really have 455 * pass around to the attribute functions, so we don't really have
456 * choice but implement a bunch of them... 456 * choice but implement a bunch of them...
457 * 457 *
458 * FIXME, it does now...
458 */ 459 */
459#define BUILD_SHOW_FUNC_INT(name, data) \ 460#define BUILD_SHOW_FUNC_INT(name, data) \
460static ssize_t show_##name(struct device *dev, char *buf) \ 461static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
461{ \ 462{ \
462 return sprintf(buf, "%d\n", data); \ 463 return sprintf(buf, "%d\n", data); \
463} 464}
464 465
465#define BUILD_SHOW_FUNC_STR(name, data) \ 466#define BUILD_SHOW_FUNC_STR(name, data) \
466static ssize_t show_##name(struct device *dev, char *buf) \ 467static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
467{ \ 468{ \
468 return sprintf(buf, "%s\n", data); \ 469 return sprintf(buf, "%s\n", data); \
469} 470}
470 471
471#define BUILD_SHOW_FUNC_FAN(name, data) \ 472#define BUILD_SHOW_FUNC_FAN(name, data) \
472static ssize_t show_##name(struct device *dev, char *buf) \ 473static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
473{ \ 474{ \
474 return sprintf(buf, "%d (%d rpm)\n", \ 475 return sprintf(buf, "%d (%d rpm)\n", \
475 thermostat->last_speed[data], \ 476 thermostat->last_speed[data], \
@@ -478,7 +479,7 @@ static ssize_t show_##name(struct device *dev, char *buf) \
478} 479}
479 480
480#define BUILD_STORE_FUNC_DEG(name, data) \ 481#define BUILD_STORE_FUNC_DEG(name, data) \
481static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \ 482static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \
482{ \ 483{ \
483 int val; \ 484 int val; \
484 int i; \ 485 int i; \
@@ -491,7 +492,7 @@ static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \
491} 492}
492 493
493#define BUILD_STORE_FUNC_INT(name, data) \ 494#define BUILD_STORE_FUNC_INT(name, data) \
494static ssize_t store_##name(struct device *dev, const char *buf, size_t n) \ 495static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \
495{ \ 496{ \
496 u32 val; \ 497 u32 val; \
497 val = simple_strtoul(buf, NULL, 10); \ 498 val = simple_strtoul(buf, NULL, 10); \
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 82336a5a5474..feb4e2413858 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -685,7 +685,7 @@ static void fetch_cpu_pumps_minmax(void)
685 * the input twice... I accept patches :) 685 * the input twice... I accept patches :)
686 */ 686 */
687#define BUILD_SHOW_FUNC_FIX(name, data) \ 687#define BUILD_SHOW_FUNC_FIX(name, data) \
688static ssize_t show_##name(struct device *dev, char *buf) \ 688static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
689{ \ 689{ \
690 ssize_t r; \ 690 ssize_t r; \
691 down(&driver_lock); \ 691 down(&driver_lock); \
@@ -694,7 +694,7 @@ static ssize_t show_##name(struct device *dev, char *buf) \
694 return r; \ 694 return r; \
695} 695}
696#define BUILD_SHOW_FUNC_INT(name, data) \ 696#define BUILD_SHOW_FUNC_INT(name, data) \
697static ssize_t show_##name(struct device *dev, char *buf) \ 697static ssize_t show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
698{ \ 698{ \
699 return sprintf(buf, "%d", data); \ 699 return sprintf(buf, "%d", data); \
700} 700}
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index c153699d0f84..0bdb47f08c2a 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -107,13 +107,13 @@ print_temp( const char *s, int temp )
107} 107}
108 108
109static ssize_t 109static ssize_t
110show_cpu_temperature( struct device *dev, char *buf ) 110show_cpu_temperature( struct device *dev, struct device_attribute *attr, char *buf )
111{ 111{
112 return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 ); 112 return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 );
113} 113}
114 114
115static ssize_t 115static ssize_t
116show_case_temperature( struct device *dev, char *buf ) 116show_case_temperature( struct device *dev, struct device_attribute *attr, char *buf )
117{ 117{
118 return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 ); 118 return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 );
119} 119}