summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-10 16:16:33 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-10 16:16:33 -0700
commit3c693024cffa5c96a20b969f4efd058675e7700f (patch)
tree2e49a90c3e67a898770fe0ea735d00326dbe3f69 /drivers
parent107c3a73e0ee037322efa00fa3cb45b3b7eb6069 (diff)
parent10270613fb4d5a44c335cfa13e9626bf5743c01d (diff)
downloadblackbird-op-linux-3c693024cffa5c96a20b969f4efd058675e7700f.tar.gz
blackbird-op-linux-3c693024cffa5c96a20b969f4efd058675e7700f.zip
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix windfarm platform device usage [POWERPC] Fix i2c-powermac platform device usage [POWERPC] Fix secondary CPU startup on old "powersurge" SMP powermacs [POWERPC] ARCH=ppc pt_regs fixes [POWERPC] Update maple defconfig [POWERPC] Fix Maple secondary IDE interrupt [POWERPC] Make U4 PCIe work on maple [POWERPC] cell: fix default zImage build target [POWERPC] Fix boot wrapper invocation if CROSS_COMPILE contains spaces [POWERPC] Fix xmon IRQ handler for pt_regs removal
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-powermac.c28
-rw-r--r--drivers/macintosh/windfarm_pm112.c18
-rw-r--r--drivers/macintosh/windfarm_pm81.c24
-rw-r--r--drivers/macintosh/windfarm_pm91.c24
4 files changed, 45 insertions, 49 deletions
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index a508cb962d24..648d55533d87 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -182,9 +182,9 @@ static const struct i2c_algorithm i2c_powermac_algorithm = {
};
-static int i2c_powermac_remove(struct device *dev)
+static int i2c_powermac_remove(struct platform_device *dev)
{
- struct i2c_adapter *adapter = dev_get_drvdata(dev);
+ struct i2c_adapter *adapter = platform_get_drvdata(dev);
struct pmac_i2c_bus *bus = i2c_get_adapdata(adapter);
int rc;
@@ -195,16 +195,16 @@ static int i2c_powermac_remove(struct device *dev)
if (rc)
printk("i2c-powermac.c: Failed to remove bus %s !\n",
adapter->name);
- dev_set_drvdata(dev, NULL);
+ platform_set_drvdata(dev, NULL);
kfree(adapter);
return 0;
}
-static int i2c_powermac_probe(struct device *dev)
+static int __devexit i2c_powermac_probe(struct platform_device *dev)
{
- struct pmac_i2c_bus *bus = dev->platform_data;
+ struct pmac_i2c_bus *bus = dev->dev.platform_data;
struct device_node *parent = NULL;
struct i2c_adapter *adapter;
char name[32];
@@ -246,11 +246,11 @@ static int i2c_powermac_probe(struct device *dev)
printk(KERN_ERR "i2c-powermac: can't allocate inteface !\n");
return -ENOMEM;
}
- dev_set_drvdata(dev, adapter);
+ platform_set_drvdata(dev, adapter);
strcpy(adapter->name, name);
adapter->algo = &i2c_powermac_algorithm;
i2c_set_adapdata(adapter, bus);
- adapter->dev.parent = dev;
+ adapter->dev.parent = &dev->dev;
pmac_i2c_attach_adapter(bus, adapter);
rc = i2c_add_adapter(adapter);
if (rc) {
@@ -265,23 +265,25 @@ static int i2c_powermac_probe(struct device *dev)
}
-static struct device_driver i2c_powermac_driver = {
- .name = "i2c-powermac",
- .bus = &platform_bus_type,
+static struct platform_driver i2c_powermac_driver = {
.probe = i2c_powermac_probe,
- .remove = i2c_powermac_remove,
+ .remove = __devexit_p(i2c_powermac_remove),
+ .driver = {
+ .name = "i2c-powermac",
+ .bus = &platform_bus_type,
+ },
};
static int __init i2c_powermac_init(void)
{
- driver_register(&i2c_powermac_driver);
+ platform_driver_register(&i2c_powermac_driver);
return 0;
}
static void __exit i2c_powermac_cleanup(void)
{
- driver_unregister(&i2c_powermac_driver);
+ platform_driver_unregister(&i2c_powermac_driver);
}
module_init(i2c_powermac_init);
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c
index ef66bf2778ec..fa4b13f89369 100644
--- a/drivers/macintosh/windfarm_pm112.c
+++ b/drivers/macintosh/windfarm_pm112.c
@@ -650,24 +650,26 @@ static struct notifier_block pm112_events = {
.notifier_call = pm112_wf_notify,
};
-static int wf_pm112_probe(struct device *dev)
+static int wf_pm112_probe(struct platform_device *dev)
{
wf_register_client(&pm112_events);
return 0;
}
-static int wf_pm112_remove(struct device *dev)
+static int __devexit wf_pm112_remove(struct platform_device *dev)
{
wf_unregister_client(&pm112_events);
/* should release all sensors and controls */
return 0;
}
-static struct device_driver wf_pm112_driver = {
- .name = "windfarm",
- .bus = &platform_bus_type,
+static struct platform_driver wf_pm112_driver = {
.probe = wf_pm112_probe,
- .remove = wf_pm112_remove,
+ .remove = __devexit_p(wf_pm112_remove),
+ .driver = {
+ .name = "windfarm",
+ .bus = &platform_bus_type,
+ },
};
static int __init wf_pm112_init(void)
@@ -683,13 +685,13 @@ static int __init wf_pm112_init(void)
++nr_cores;
printk(KERN_INFO "windfarm: initializing for dual-core desktop G5\n");
- driver_register(&wf_pm112_driver);
+ platform_driver_register(&wf_pm112_driver);
return 0;
}
static void __exit wf_pm112_exit(void)
{
- driver_unregister(&wf_pm112_driver);
+ platform_driver_unregister(&wf_pm112_driver);
}
module_init(wf_pm112_init);
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c
index 2ff546e4c92f..2a944851b8e1 100644
--- a/drivers/macintosh/windfarm_pm81.c
+++ b/drivers/macintosh/windfarm_pm81.c
@@ -131,8 +131,6 @@
static int wf_smu_mach_model; /* machine model id */
-static struct device *wf_smu_dev;
-
/* Controls & sensors */
static struct wf_sensor *sensor_cpu_power;
static struct wf_sensor *sensor_cpu_temp;
@@ -717,16 +715,14 @@ static int wf_init_pm(void)
return 0;
}
-static int wf_smu_probe(struct device *ddev)
+static int wf_smu_probe(struct platform_device *ddev)
{
- wf_smu_dev = ddev;
-
wf_register_client(&wf_smu_events);
return 0;
}
-static int wf_smu_remove(struct device *ddev)
+static int __devexit wf_smu_remove(struct platform_device *ddev)
{
wf_unregister_client(&wf_smu_events);
@@ -766,16 +762,16 @@ static int wf_smu_remove(struct device *ddev)
if (wf_smu_cpu_fans)
kfree(wf_smu_cpu_fans);
- wf_smu_dev = NULL;
-
return 0;
}
-static struct device_driver wf_smu_driver = {
- .name = "windfarm",
- .bus = &platform_bus_type,
+static struct platform_driver wf_smu_driver = {
.probe = wf_smu_probe,
- .remove = wf_smu_remove,
+ .remove = __devexit_p(wf_smu_remove),
+ .driver = {
+ .name = "windfarm",
+ .bus = &platform_bus_type,
+ },
};
@@ -794,7 +790,7 @@ static int __init wf_smu_init(void)
request_module("windfarm_lm75_sensor");
#endif /* MODULE */
- driver_register(&wf_smu_driver);
+ platform_driver_register(&wf_smu_driver);
}
return rc;
@@ -803,7 +799,7 @@ static int __init wf_smu_init(void)
static void __exit wf_smu_exit(void)
{
- driver_unregister(&wf_smu_driver);
+ platform_driver_unregister(&wf_smu_driver);
}
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c
index 59e9ffe37c39..9961a67b4f85 100644
--- a/drivers/macintosh/windfarm_pm91.c
+++ b/drivers/macintosh/windfarm_pm91.c
@@ -63,8 +63,6 @@
*/
#undef HACKED_OVERTEMP
-static struct device *wf_smu_dev;
-
/* Controls & sensors */
static struct wf_sensor *sensor_cpu_power;
static struct wf_sensor *sensor_cpu_temp;
@@ -641,16 +639,14 @@ static int wf_init_pm(void)
return 0;
}
-static int wf_smu_probe(struct device *ddev)
+static int wf_smu_probe(struct platform_device *ddev)
{
- wf_smu_dev = ddev;
-
wf_register_client(&wf_smu_events);
return 0;
}
-static int wf_smu_remove(struct device *ddev)
+static int __devexit wf_smu_remove(struct platform_device *ddev)
{
wf_unregister_client(&wf_smu_events);
@@ -698,16 +694,16 @@ static int wf_smu_remove(struct device *ddev)
if (wf_smu_cpu_fans)
kfree(wf_smu_cpu_fans);
- wf_smu_dev = NULL;
-
return 0;
}
-static struct device_driver wf_smu_driver = {
- .name = "windfarm",
- .bus = &platform_bus_type,
+static struct platform_driver wf_smu_driver = {
.probe = wf_smu_probe,
- .remove = wf_smu_remove,
+ .remove = __devexit_p(wf_smu_remove),
+ .driver = {
+ .name = "windfarm",
+ .bus = &platform_bus_type,
+ },
};
@@ -725,7 +721,7 @@ static int __init wf_smu_init(void)
request_module("windfarm_lm75_sensor");
#endif /* MODULE */
- driver_register(&wf_smu_driver);
+ platform_driver_register(&wf_smu_driver);
}
return rc;
@@ -734,7 +730,7 @@ static int __init wf_smu_init(void)
static void __exit wf_smu_exit(void)
{
- driver_unregister(&wf_smu_driver);
+ platform_driver_unregister(&wf_smu_driver);
}
OpenPOWER on IntegriCloud