aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/smu.c4
-rw-r--r--drivers/macintosh/via-pmu-backlight.c2
-rw-r--r--drivers/macintosh/via-pmu.c14
-rw-r--r--drivers/macintosh/via-pmu68k.c6
-rw-r--r--drivers/macintosh/windfarm_smu_controls.c2
-rw-r--r--drivers/macintosh/windfarm_smu_sat.c7
-rw-r--r--drivers/macintosh/windfarm_smu_sensors.c2
7 files changed, 18 insertions, 19 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 090e40fc5013..c0f9d82e4662 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -870,7 +870,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd)
870 870
871static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len) 871static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len)
872{ 872{
873 DECLARE_COMPLETION(comp); 873 DECLARE_COMPLETION_ONSTACK(comp);
874 unsigned int chunk; 874 unsigned int chunk;
875 struct smu_cmd cmd; 875 struct smu_cmd cmd;
876 int rc; 876 int rc;
@@ -917,7 +917,7 @@ static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len)
917 917
918static struct smu_sdbp_header *smu_create_sdb_partition(int id) 918static struct smu_sdbp_header *smu_create_sdb_partition(int id)
919{ 919{
920 DECLARE_COMPLETION(comp); 920 DECLARE_COMPLETION_ONSTACK(comp);
921 struct smu_simple_cmd cmd; 921 struct smu_simple_cmd cmd;
922 unsigned int addr, len, tlen; 922 unsigned int addr, len, tlen;
923 struct smu_sdbp_header *hdr; 923 struct smu_sdbp_header *hdr;
diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c
index a82f313d9dc9..6c29fe727c0f 100644
--- a/drivers/macintosh/via-pmu-backlight.c
+++ b/drivers/macintosh/via-pmu-backlight.c
@@ -16,7 +16,7 @@
16#define MAX_PMU_LEVEL 0xFF 16#define MAX_PMU_LEVEL 0xFF
17 17
18static struct backlight_properties pmu_backlight_data; 18static struct backlight_properties pmu_backlight_data;
19static spinlock_t pmu_backlight_lock; 19static DEFINE_SPINLOCK(pmu_backlight_lock);
20static int sleeping; 20static int sleeping;
21static u8 bl_curve[FB_BACKLIGHT_LEVELS]; 21static u8 bl_curve[FB_BACKLIGHT_LEVELS];
22 22
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 5710e01cef10..4f04fd0956a0 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -1832,7 +1832,7 @@ pbook_alloc_pci_save(void)
1832 struct pci_dev *pd = NULL; 1832 struct pci_dev *pd = NULL;
1833 1833
1834 npci = 0; 1834 npci = 0;
1835 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 1835 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
1836 ++npci; 1836 ++npci;
1837 } 1837 }
1838 if (npci == 0) 1838 if (npci == 0)
@@ -1862,9 +1862,11 @@ pbook_pci_save(void)
1862 if (ps == NULL) 1862 if (ps == NULL)
1863 return; 1863 return;
1864 1864
1865 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 1865 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
1866 if (npci-- == 0) 1866 if (npci-- == 0) {
1867 pci_dev_put(pd);
1867 return; 1868 return;
1869 }
1868#ifndef HACKED_PCI_SAVE 1870#ifndef HACKED_PCI_SAVE
1869 pci_read_config_word(pd, PCI_COMMAND, &ps->command); 1871 pci_read_config_word(pd, PCI_COMMAND, &ps->command);
1870 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat); 1872 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
@@ -1892,11 +1894,13 @@ pbook_pci_restore(void)
1892 int npci = pbook_npci_saves; 1894 int npci = pbook_npci_saves;
1893 int j; 1895 int j;
1894 1896
1895 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 1897 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
1896#ifdef HACKED_PCI_SAVE 1898#ifdef HACKED_PCI_SAVE
1897 int i; 1899 int i;
1898 if (npci-- == 0) 1900 if (npci-- == 0) {
1901 pci_dev_put(pd);
1899 return; 1902 return;
1903 }
1900 ps++; 1904 ps++;
1901 for (i=2;i<16;i++) 1905 for (i=2;i<16;i++)
1902 pci_write_config_dword(pd, i<<4, ps->config[i]); 1906 pci_write_config_dword(pd, i<<4, ps->config[i]);
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c
index 35b70323e7e3..9f4eff1d1a0f 100644
--- a/drivers/macintosh/via-pmu68k.c
+++ b/drivers/macintosh/via-pmu68k.c
@@ -843,7 +843,7 @@ pbook_pci_save(void)
843 struct pci_save *ps; 843 struct pci_save *ps;
844 844
845 npci = 0; 845 npci = 0;
846 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) 846 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
847 ++npci; 847 ++npci;
848 n_pbook_pci_saves = npci; 848 n_pbook_pci_saves = npci;
849 if (npci == 0) 849 if (npci == 0)
@@ -854,7 +854,7 @@ pbook_pci_save(void)
854 return; 854 return;
855 855
856 pd = NULL; 856 pd = NULL;
857 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 857 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
858 pci_read_config_word(pd, PCI_COMMAND, &ps->command); 858 pci_read_config_word(pd, PCI_COMMAND, &ps->command);
859 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat); 859 pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
860 pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr); 860 pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
@@ -871,7 +871,7 @@ pbook_pci_restore(void)
871 struct pci_dev *pd = NULL; 871 struct pci_dev *pd = NULL;
872 int j; 872 int j;
873 873
874 while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) { 874 while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
875 if (ps->command == 0) 875 if (ps->command == 0)
876 continue; 876 continue;
877 pci_read_config_word(pd, PCI_COMMAND, &cmd); 877 pci_read_config_word(pd, PCI_COMMAND, &cmd);
diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c
index bff1f372f188..31b750d61206 100644
--- a/drivers/macintosh/windfarm_smu_controls.c
+++ b/drivers/macintosh/windfarm_smu_controls.c
@@ -56,7 +56,7 @@ static int smu_set_fan(int pwm, u8 id, u16 value)
56{ 56{
57 struct smu_cmd cmd; 57 struct smu_cmd cmd;
58 u8 buffer[16]; 58 u8 buffer[16];
59 DECLARE_COMPLETION(comp); 59 DECLARE_COMPLETION_ONSTACK(comp);
60 int rc; 60 int rc;
61 61
62 /* Fill SMU command structure */ 62 /* Fill SMU command structure */
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index aceb61d9fbc8..83f79de7174b 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -397,12 +397,7 @@ static int wf_sat_detach(struct i2c_client *client)
397 397
398static int __init sat_sensors_init(void) 398static int __init sat_sensors_init(void)
399{ 399{
400 int err; 400 return i2c_add_driver(&wf_sat_driver);
401
402 err = i2c_add_driver(&wf_sat_driver);
403 if (err < 0)
404 return err;
405 return 0;
406} 401}
407 402
408static void __exit sat_sensors_exit(void) 403static void __exit sat_sensors_exit(void)
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c
index defe9922ebd1..01b4c50143dd 100644
--- a/drivers/macintosh/windfarm_smu_sensors.c
+++ b/drivers/macintosh/windfarm_smu_sensors.c
@@ -67,7 +67,7 @@ static void smu_ads_release(struct wf_sensor *sr)
67static int smu_read_adc(u8 id, s32 *value) 67static int smu_read_adc(u8 id, s32 *value)
68{ 68{
69 struct smu_simple_cmd cmd; 69 struct smu_simple_cmd cmd;
70 DECLARE_COMPLETION(comp); 70 DECLARE_COMPLETION_ONSTACK(comp);
71 int rc; 71 int rc;
72 72
73 rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1, 73 rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1,