diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/macio_asic.c | 17 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/via-maciisi.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu-led.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_lm75_sensor.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_max6690_sensor.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sat.c | 4 |
10 files changed, 35 insertions, 12 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 6e149f4a1ff..588a5b0bc4b 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -294,10 +294,11 @@ static void macio_setup_interrupts(struct macio_dev *dev) | |||
294 | int i = 0, j = 0; | 294 | int i = 0, j = 0; |
295 | 295 | ||
296 | for (;;) { | 296 | for (;;) { |
297 | struct resource *res = &dev->interrupt[j]; | 297 | struct resource *res; |
298 | 298 | ||
299 | if (j >= MACIO_DEV_COUNT_IRQS) | 299 | if (j >= MACIO_DEV_COUNT_IRQS) |
300 | break; | 300 | break; |
301 | res = &dev->interrupt[j]; | ||
301 | irq = irq_of_parse_and_map(np, i++); | 302 | irq = irq_of_parse_and_map(np, i++); |
302 | if (irq == NO_IRQ) | 303 | if (irq == NO_IRQ) |
303 | break; | 304 | break; |
@@ -321,9 +322,10 @@ static void macio_setup_resources(struct macio_dev *dev, | |||
321 | int index; | 322 | int index; |
322 | 323 | ||
323 | for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { | 324 | for (index = 0; of_address_to_resource(np, index, &r) == 0; index++) { |
324 | struct resource *res = &dev->resource[index]; | 325 | struct resource *res; |
325 | if (index >= MACIO_DEV_COUNT_RESOURCES) | 326 | if (index >= MACIO_DEV_COUNT_RESOURCES) |
326 | break; | 327 | break; |
328 | res = &dev->resource[index]; | ||
327 | *res = r; | 329 | *res = r; |
328 | res->name = dev_name(&dev->ofdev.dev); | 330 | res->name = dev_name(&dev->ofdev.dev); |
329 | 331 | ||
@@ -378,6 +380,17 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
378 | dev->ofdev.dev.bus = &macio_bus_type; | 380 | dev->ofdev.dev.bus = &macio_bus_type; |
379 | dev->ofdev.dev.release = macio_release_dev; | 381 | dev->ofdev.dev.release = macio_release_dev; |
380 | 382 | ||
383 | #ifdef CONFIG_PCI | ||
384 | /* Set the DMA ops to the ones from the PCI device, this could be | ||
385 | * fishy if we didn't know that on PowerMac it's always direct ops | ||
386 | * or iommu ops that will work fine | ||
387 | */ | ||
388 | dev->ofdev.dev.archdata.dma_ops = | ||
389 | chip->lbus.pdev->dev.archdata.dma_ops; | ||
390 | dev->ofdev.dev.archdata.dma_data = | ||
391 | chip->lbus.pdev->dev.archdata.dma_data; | ||
392 | #endif /* CONFIG_PCI */ | ||
393 | |||
381 | #ifdef DEBUG | 394 | #ifdef DEBUG |
382 | printk("preparing mdev @%p, ofdev @%p, dev @%p, kobj @%p\n", | 395 | printk("preparing mdev @%p, ofdev @%p, dev @%p, kobj @%p\n", |
383 | dev, &dev->ofdev, &dev->ofdev.dev, &dev->ofdev.dev.kobj); | 396 | dev, &dev->ofdev, &dev->ofdev.dev, &dev->ofdev.dev.kobj); |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index a98ab72adf9..93fb32038b1 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -274,7 +274,7 @@ static void __devinit rackmeter_init_cpu_sniffer(struct rackmeter *rm) | |||
274 | 274 | ||
275 | if (cpu > 1) | 275 | if (cpu > 1) |
276 | continue; | 276 | continue; |
277 | rcpu = &rm->cpu[cpu];; | 277 | rcpu = &rm->cpu[cpu]; |
278 | rcpu->prev_idle = get_cpu_idle_time(cpu); | 278 | rcpu->prev_idle = get_cpu_idle_time(cpu); |
279 | rcpu->prev_wall = jiffies64_to_cputime64(get_jiffies_64()); | 279 | rcpu->prev_wall = jiffies64_to_cputime64(get_jiffies_64()); |
280 | schedule_delayed_work_on(cpu, &rm->cpu[cpu].sniffer, | 280 | schedule_delayed_work_on(cpu, &rm->cpu[cpu].sniffer, |
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index fde377c60cc..556f0feaa4d 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -124,6 +124,8 @@ read_reg(struct thermostat* th, int reg) | |||
124 | return data; | 124 | return data; |
125 | } | 125 | } |
126 | 126 | ||
127 | static struct i2c_driver thermostat_driver; | ||
128 | |||
127 | static int | 129 | static int |
128 | attach_thermostat(struct i2c_adapter *adapter) | 130 | attach_thermostat(struct i2c_adapter *adapter) |
129 | { | 131 | { |
@@ -148,7 +150,7 @@ attach_thermostat(struct i2c_adapter *adapter) | |||
148 | * Let i2c-core delete that device on driver removal. | 150 | * Let i2c-core delete that device on driver removal. |
149 | * This is safe because i2c-core holds the core_lock mutex for us. | 151 | * This is safe because i2c-core holds the core_lock mutex for us. |
150 | */ | 152 | */ |
151 | list_add_tail(&client->detected, &client->driver->clients); | 153 | list_add_tail(&client->detected, &thermostat_driver.clients); |
152 | return 0; | 154 | return 0; |
153 | } | 155 | } |
154 | 156 | ||
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index a028598af2d..ea32c7e5a9a 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -286,6 +286,8 @@ struct fcu_fan_table fcu_fans[] = { | |||
286 | }, | 286 | }, |
287 | }; | 287 | }; |
288 | 288 | ||
289 | static struct i2c_driver therm_pm72_driver; | ||
290 | |||
289 | /* | 291 | /* |
290 | * Utility function to create an i2c_client structure and | 292 | * Utility function to create an i2c_client structure and |
291 | * attach it to one of u3 adapters | 293 | * attach it to one of u3 adapters |
@@ -318,7 +320,7 @@ static struct i2c_client *attach_i2c_chip(int id, const char *name) | |||
318 | * Let i2c-core delete that device on driver removal. | 320 | * Let i2c-core delete that device on driver removal. |
319 | * This is safe because i2c-core holds the core_lock mutex for us. | 321 | * This is safe because i2c-core holds the core_lock mutex for us. |
320 | */ | 322 | */ |
321 | list_add_tail(&clt->detected, &clt->driver->clients); | 323 | list_add_tail(&clt->detected, &therm_pm72_driver.clients); |
322 | return clt; | 324 | return clt; |
323 | } | 325 | } |
324 | 326 | ||
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 40023313a76..8b9364434aa 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -239,8 +239,8 @@ setup_hardware( void ) | |||
239 | * to be on the safe side (OSX doesn't)... | 239 | * to be on the safe side (OSX doesn't)... |
240 | */ | 240 | */ |
241 | if( x.overheat_temp == (80 << 8) ) { | 241 | if( x.overheat_temp == (80 << 8) ) { |
242 | x.overheat_temp = 65 << 8; | 242 | x.overheat_temp = 75 << 8; |
243 | x.overheat_hyst = 60 << 8; | 243 | x.overheat_hyst = 70 << 8; |
244 | write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); | 244 | write_reg( x.thermostat, 2, x.overheat_hyst, 2 ); |
245 | write_reg( x.thermostat, 3, x.overheat_temp, 2 ); | 245 | write_reg( x.thermostat, 3, x.overheat_temp, 2 ); |
246 | 246 | ||
diff --git a/drivers/macintosh/via-maciisi.c b/drivers/macintosh/via-maciisi.c index 4d686c0bdea..9ab5b0c34f0 100644 --- a/drivers/macintosh/via-maciisi.c +++ b/drivers/macintosh/via-maciisi.c | |||
@@ -288,7 +288,7 @@ static void maciisi_sync(struct adb_request *req) | |||
288 | } | 288 | } |
289 | /* This could be BAD... when the ADB controller doesn't respond | 289 | /* This could be BAD... when the ADB controller doesn't respond |
290 | * for this long, it's probably not coming back :-( */ | 290 | * for this long, it's probably not coming back :-( */ |
291 | if(count >= 50) /* Hopefully shouldn't happen */ | 291 | if (count > 50) /* Hopefully shouldn't happen */ |
292 | printk(KERN_ERR "maciisi_send_request: poll timed out!\n"); | 292 | printk(KERN_ERR "maciisi_send_request: poll timed out!\n"); |
293 | } | 293 | } |
294 | 294 | ||
diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c index 55ad9567138..d242976bcfe 100644 --- a/drivers/macintosh/via-pmu-led.c +++ b/drivers/macintosh/via-pmu-led.c | |||
@@ -72,7 +72,7 @@ static void pmu_led_set(struct led_classdev *led_cdev, | |||
72 | } | 72 | } |
73 | 73 | ||
74 | static struct led_classdev pmu_led = { | 74 | static struct led_classdev pmu_led = { |
75 | .name = "pmu-front-led", | 75 | .name = "pmu-led::front", |
76 | #ifdef CONFIG_ADB_PMU_LED_IDE | 76 | #ifdef CONFIG_ADB_PMU_LED_IDE |
77 | .default_trigger = "ide-disk", | 77 | .default_trigger = "ide-disk", |
78 | #endif | 78 | #endif |
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index 529886c7a82..ed6426a1077 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c | |||
@@ -115,6 +115,8 @@ static int wf_lm75_probe(struct i2c_client *client, | |||
115 | return rc; | 115 | return rc; |
116 | } | 116 | } |
117 | 117 | ||
118 | static struct i2c_driver wf_lm75_driver; | ||
119 | |||
118 | static struct i2c_client *wf_lm75_create(struct i2c_adapter *adapter, | 120 | static struct i2c_client *wf_lm75_create(struct i2c_adapter *adapter, |
119 | u8 addr, int ds1775, | 121 | u8 addr, int ds1775, |
120 | const char *loc) | 122 | const char *loc) |
@@ -157,7 +159,7 @@ static struct i2c_client *wf_lm75_create(struct i2c_adapter *adapter, | |||
157 | * Let i2c-core delete that device on driver removal. | 159 | * Let i2c-core delete that device on driver removal. |
158 | * This is safe because i2c-core holds the core_lock mutex for us. | 160 | * This is safe because i2c-core holds the core_lock mutex for us. |
159 | */ | 161 | */ |
160 | list_add_tail(&client->detected, &client->driver->clients); | 162 | list_add_tail(&client->detected, &wf_lm75_driver.clients); |
161 | return client; | 163 | return client; |
162 | fail: | 164 | fail: |
163 | return NULL; | 165 | return NULL; |
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c index e2a55ecda2b..a67b349319e 100644 --- a/drivers/macintosh/windfarm_max6690_sensor.c +++ b/drivers/macintosh/windfarm_max6690_sensor.c | |||
@@ -88,6 +88,8 @@ static int wf_max6690_probe(struct i2c_client *client, | |||
88 | return rc; | 88 | return rc; |
89 | } | 89 | } |
90 | 90 | ||
91 | static struct i2c_driver wf_max6690_driver; | ||
92 | |||
91 | static struct i2c_client *wf_max6690_create(struct i2c_adapter *adapter, | 93 | static struct i2c_client *wf_max6690_create(struct i2c_adapter *adapter, |
92 | u8 addr, const char *loc) | 94 | u8 addr, const char *loc) |
93 | { | 95 | { |
@@ -119,7 +121,7 @@ static struct i2c_client *wf_max6690_create(struct i2c_adapter *adapter, | |||
119 | * Let i2c-core delete that device on driver removal. | 121 | * Let i2c-core delete that device on driver removal. |
120 | * This is safe because i2c-core holds the core_lock mutex for us. | 122 | * This is safe because i2c-core holds the core_lock mutex for us. |
121 | */ | 123 | */ |
122 | list_add_tail(&client->detected, &client->driver->clients); | 124 | list_add_tail(&client->detected, &wf_max6690_driver.clients); |
123 | return client; | 125 | return client; |
124 | 126 | ||
125 | fail: | 127 | fail: |
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 5da729e58f9..e20330a2895 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -194,6 +194,8 @@ static struct wf_sensor_ops wf_sat_ops = { | |||
194 | .owner = THIS_MODULE, | 194 | .owner = THIS_MODULE, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | static struct i2c_driver wf_sat_driver; | ||
198 | |||
197 | static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev) | 199 | static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev) |
198 | { | 200 | { |
199 | struct i2c_board_info info; | 201 | struct i2c_board_info info; |
@@ -222,7 +224,7 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev) | |||
222 | * Let i2c-core delete that device on driver removal. | 224 | * Let i2c-core delete that device on driver removal. |
223 | * This is safe because i2c-core holds the core_lock mutex for us. | 225 | * This is safe because i2c-core holds the core_lock mutex for us. |
224 | */ | 226 | */ |
225 | list_add_tail(&client->detected, &client->driver->clients); | 227 | list_add_tail(&client->detected, &wf_sat_driver.clients); |
226 | } | 228 | } |
227 | 229 | ||
228 | static int wf_sat_probe(struct i2c_client *client, | 230 | static int wf_sat_probe(struct i2c_client *client, |