aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/adb.c9
-rw-r--r--drivers/macintosh/therm_adt746x.c11
-rw-r--r--drivers/macintosh/therm_pm72.c4
-rw-r--r--drivers/macintosh/therm_windtunnel.c10
-rw-r--r--drivers/macintosh/via-pmu.c6
5 files changed, 24 insertions, 16 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 7297c77f99cf..493e2afa191c 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -77,7 +77,7 @@ static struct adb_driver *adb_driver_list[] = {
77 NULL 77 NULL
78}; 78};
79 79
80static struct class_simple *adb_dev_class; 80static struct class *adb_dev_class;
81 81
82struct adb_driver *adb_controller; 82struct adb_driver *adb_controller;
83struct notifier_block *adb_client_list = NULL; 83struct notifier_block *adb_client_list = NULL;
@@ -902,9 +902,8 @@ adbdev_init(void)
902 902
903 devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); 903 devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb");
904 904
905 adb_dev_class = class_simple_create(THIS_MODULE, "adb"); 905 adb_dev_class = class_create(THIS_MODULE, "adb");
906 if (IS_ERR(adb_dev_class)) { 906 if (IS_ERR(adb_dev_class))
907 return; 907 return;
908 } 908 class_device_create(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb");
909 class_simple_device_add(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb");
910} 909}
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..61400f04015e 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -51,8 +51,10 @@
51static int do_probe( struct i2c_adapter *adapter, int addr, int kind); 51static int do_probe( struct i2c_adapter *adapter, int addr, int kind);
52 52
53/* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */ 53/* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */
54static unsigned short normal_i2c[] = { 0x49, 0x2c, I2C_CLIENT_END }; 54static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
55static unsigned short normal_i2c_range[] = { 0x48, 0x4f, 0x2c, 0x2f, I2C_CLIENT_END }; 55 0x4c, 0x4d, 0x4e, 0x4f,
56 0x2c, 0x2d, 0x2e, 0x2f,
57 I2C_CLIENT_END };
56 58
57I2C_CLIENT_INSMOD; 59I2C_CLIENT_INSMOD;
58 60
@@ -107,13 +109,13 @@ print_temp( const char *s, int temp )
107} 109}
108 110
109static ssize_t 111static ssize_t
110show_cpu_temperature( struct device *dev, char *buf ) 112show_cpu_temperature( struct device *dev, struct device_attribute *attr, char *buf )
111{ 113{
112 return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 ); 114 return sprintf(buf, "%d.%d\n", x.temp>>8, (x.temp & 255)*10/256 );
113} 115}
114 116
115static ssize_t 117static ssize_t
116show_case_temperature( struct device *dev, char *buf ) 118show_case_temperature( struct device *dev, struct device_attribute *attr, char *buf )
117{ 119{
118 return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 ); 120 return sprintf(buf, "%d.%d\n", x.casetemp>>8, (x.casetemp & 255)*10/256 );
119} 121}
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index bb9f4044c74d..b941ee220997 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -2593,6 +2593,9 @@ powerbook_sleep_Core99(void)
2593 /* Restore VIA */ 2593 /* Restore VIA */
2594 restore_via_state(); 2594 restore_via_state();
2595 2595
2596 /* tweak LPJ before cpufreq is there */
2597 loops_per_jiffy *= 2;
2598
2596 /* Restore video */ 2599 /* Restore video */
2597 pmac_call_early_video_resume(); 2600 pmac_call_early_video_resume();
2598 2601
@@ -2613,6 +2616,9 @@ powerbook_sleep_Core99(void)
2613 pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask); 2616 pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask);
2614 pmu_wait_complete(&req); 2617 pmu_wait_complete(&req);
2615 2618
2619 /* Restore LPJ, cpufreq will adjust the cpu frequency */
2620 loops_per_jiffy /= 2;
2621
2616 pmac_wakeup_devices(); 2622 pmac_wakeup_devices();
2617 2623
2618 return 0; 2624 return 0;