diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 20:28:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 20:28:10 -0400 |
commit | 4c5811bf463b0ef82fabbd1708f8bb2d753aeb18 (patch) | |
tree | ff37d31217c3804ca05de21a55a9b5ca1ca818b2 /drivers/edac | |
parent | f74b9444192c60603020c61d7915b72893137edc (diff) | |
parent | 9f15444fefdb33509132ff5c9be60cb315c44cb2 (diff) |
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: (21 commits)
tty: serial: altera_jtaguart: Add device tree support
tty: serial: altera_uart: Add devicetree support
dt: eliminate of_platform_driver shim code
dt: Eliminate of_platform_{,un}register_driver
dt/serial: Eliminate users of of_platform_{,un}register_driver
dt/usb: Eliminate users of of_platform_{,un}register_driver
dt/video: Eliminate users of of_platform_{,un}register_driver
dt/net: Eliminate users of of_platform_{,un}register_driver
dt/sound: Eliminate users of of_platform_{,un}register_driver
dt/spi: Eliminate users of of_platform_{,un}register_driver
dt: uartlite: merge platform and of_platform driver bindings
dt: xilinx_hwicap: merge platform and of_platform driver bindings
ipmi: convert OF driver to platform driver
leds/leds-gpio: merge platform_driver with of_platform_driver
dt/sparc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: Eliminate users of of_platform_{,un}register_driver
dt/powerpc: move of_bus_type infrastructure to ibmebus
drivercore/dt: add a match table pointer to struct device
dt: Typo fix.
altera_ps2: Add devicetree support
...
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/mpc85xx_edac.c | 27 | ||||
-rw-r--r-- | drivers/edac/ppc4xx_edac.c | 23 |
2 files changed, 19 insertions, 31 deletions
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index b123bb308a4a..ffb5ad080bee 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
@@ -200,8 +200,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id) | |||
200 | return IRQ_HANDLED; | 200 | return IRQ_HANDLED; |
201 | } | 201 | } |
202 | 202 | ||
203 | static int __devinit mpc85xx_pci_err_probe(struct platform_device *op, | 203 | static int __devinit mpc85xx_pci_err_probe(struct platform_device *op) |
204 | const struct of_device_id *match) | ||
205 | { | 204 | { |
206 | struct edac_pci_ctl_info *pci; | 205 | struct edac_pci_ctl_info *pci; |
207 | struct mpc85xx_pci_pdata *pdata; | 206 | struct mpc85xx_pci_pdata *pdata; |
@@ -338,7 +337,7 @@ static struct of_device_id mpc85xx_pci_err_of_match[] = { | |||
338 | }; | 337 | }; |
339 | MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match); | 338 | MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match); |
340 | 339 | ||
341 | static struct of_platform_driver mpc85xx_pci_err_driver = { | 340 | static struct platform_driver mpc85xx_pci_err_driver = { |
342 | .probe = mpc85xx_pci_err_probe, | 341 | .probe = mpc85xx_pci_err_probe, |
343 | .remove = __devexit_p(mpc85xx_pci_err_remove), | 342 | .remove = __devexit_p(mpc85xx_pci_err_remove), |
344 | .driver = { | 343 | .driver = { |
@@ -503,8 +502,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id) | |||
503 | return IRQ_HANDLED; | 502 | return IRQ_HANDLED; |
504 | } | 503 | } |
505 | 504 | ||
506 | static int __devinit mpc85xx_l2_err_probe(struct platform_device *op, | 505 | static int __devinit mpc85xx_l2_err_probe(struct platform_device *op) |
507 | const struct of_device_id *match) | ||
508 | { | 506 | { |
509 | struct edac_device_ctl_info *edac_dev; | 507 | struct edac_device_ctl_info *edac_dev; |
510 | struct mpc85xx_l2_pdata *pdata; | 508 | struct mpc85xx_l2_pdata *pdata; |
@@ -656,7 +654,7 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = { | |||
656 | }; | 654 | }; |
657 | MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match); | 655 | MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match); |
658 | 656 | ||
659 | static struct of_platform_driver mpc85xx_l2_err_driver = { | 657 | static struct platform_driver mpc85xx_l2_err_driver = { |
660 | .probe = mpc85xx_l2_err_probe, | 658 | .probe = mpc85xx_l2_err_probe, |
661 | .remove = mpc85xx_l2_err_remove, | 659 | .remove = mpc85xx_l2_err_remove, |
662 | .driver = { | 660 | .driver = { |
@@ -956,8 +954,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci) | |||
956 | } | 954 | } |
957 | } | 955 | } |
958 | 956 | ||
959 | static int __devinit mpc85xx_mc_err_probe(struct platform_device *op, | 957 | static int __devinit mpc85xx_mc_err_probe(struct platform_device *op) |
960 | const struct of_device_id *match) | ||
961 | { | 958 | { |
962 | struct mem_ctl_info *mci; | 959 | struct mem_ctl_info *mci; |
963 | struct mpc85xx_mc_pdata *pdata; | 960 | struct mpc85xx_mc_pdata *pdata; |
@@ -1136,7 +1133,7 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = { | |||
1136 | }; | 1133 | }; |
1137 | MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match); | 1134 | MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match); |
1138 | 1135 | ||
1139 | static struct of_platform_driver mpc85xx_mc_err_driver = { | 1136 | static struct platform_driver mpc85xx_mc_err_driver = { |
1140 | .probe = mpc85xx_mc_err_probe, | 1137 | .probe = mpc85xx_mc_err_probe, |
1141 | .remove = mpc85xx_mc_err_remove, | 1138 | .remove = mpc85xx_mc_err_remove, |
1142 | .driver = { | 1139 | .driver = { |
@@ -1171,16 +1168,16 @@ static int __init mpc85xx_mc_init(void) | |||
1171 | break; | 1168 | break; |
1172 | } | 1169 | } |
1173 | 1170 | ||
1174 | res = of_register_platform_driver(&mpc85xx_mc_err_driver); | 1171 | res = platform_driver_register(&mpc85xx_mc_err_driver); |
1175 | if (res) | 1172 | if (res) |
1176 | printk(KERN_WARNING EDAC_MOD_STR "MC fails to register\n"); | 1173 | printk(KERN_WARNING EDAC_MOD_STR "MC fails to register\n"); |
1177 | 1174 | ||
1178 | res = of_register_platform_driver(&mpc85xx_l2_err_driver); | 1175 | res = platform_driver_register(&mpc85xx_l2_err_driver); |
1179 | if (res) | 1176 | if (res) |
1180 | printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n"); | 1177 | printk(KERN_WARNING EDAC_MOD_STR "L2 fails to register\n"); |
1181 | 1178 | ||
1182 | #ifdef CONFIG_PCI | 1179 | #ifdef CONFIG_PCI |
1183 | res = of_register_platform_driver(&mpc85xx_pci_err_driver); | 1180 | res = platform_driver_register(&mpc85xx_pci_err_driver); |
1184 | if (res) | 1181 | if (res) |
1185 | printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n"); | 1182 | printk(KERN_WARNING EDAC_MOD_STR "PCI fails to register\n"); |
1186 | #endif | 1183 | #endif |
@@ -1212,10 +1209,10 @@ static void __exit mpc85xx_mc_exit(void) | |||
1212 | on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); | 1209 | on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); |
1213 | #endif | 1210 | #endif |
1214 | #ifdef CONFIG_PCI | 1211 | #ifdef CONFIG_PCI |
1215 | of_unregister_platform_driver(&mpc85xx_pci_err_driver); | 1212 | platform_driver_unregister(&mpc85xx_pci_err_driver); |
1216 | #endif | 1213 | #endif |
1217 | of_unregister_platform_driver(&mpc85xx_l2_err_driver); | 1214 | platform_driver_unregister(&mpc85xx_l2_err_driver); |
1218 | of_unregister_platform_driver(&mpc85xx_mc_err_driver); | 1215 | platform_driver_unregister(&mpc85xx_mc_err_driver); |
1219 | } | 1216 | } |
1220 | 1217 | ||
1221 | module_exit(mpc85xx_mc_exit); | 1218 | module_exit(mpc85xx_mc_exit); |
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c index b9f0c20df1aa..c1f0045ceb8e 100644 --- a/drivers/edac/ppc4xx_edac.c +++ b/drivers/edac/ppc4xx_edac.c | |||
@@ -184,8 +184,7 @@ struct ppc4xx_ecc_status { | |||
184 | 184 | ||
185 | /* Function Prototypes */ | 185 | /* Function Prototypes */ |
186 | 186 | ||
187 | static int ppc4xx_edac_probe(struct platform_device *device, | 187 | static int ppc4xx_edac_probe(struct platform_device *device) |
188 | const struct of_device_id *device_id); | ||
189 | static int ppc4xx_edac_remove(struct platform_device *device); | 188 | static int ppc4xx_edac_remove(struct platform_device *device); |
190 | 189 | ||
191 | /* Global Variables */ | 190 | /* Global Variables */ |
@@ -201,7 +200,7 @@ static struct of_device_id ppc4xx_edac_match[] = { | |||
201 | { } | 200 | { } |
202 | }; | 201 | }; |
203 | 202 | ||
204 | static struct of_platform_driver ppc4xx_edac_driver = { | 203 | static struct platform_driver ppc4xx_edac_driver = { |
205 | .probe = ppc4xx_edac_probe, | 204 | .probe = ppc4xx_edac_probe, |
206 | .remove = ppc4xx_edac_remove, | 205 | .remove = ppc4xx_edac_remove, |
207 | .driver = { | 206 | .driver = { |
@@ -997,9 +996,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | |||
997 | * initialized. | 996 | * initialized. |
998 | * @op: A pointer to the OpenFirmware device tree node associated | 997 | * @op: A pointer to the OpenFirmware device tree node associated |
999 | * with the controller this EDAC instance is bound to. | 998 | * with the controller this EDAC instance is bound to. |
1000 | * @match: A pointer to the OpenFirmware device tree match | ||
1001 | * information associated with the controller this EDAC instance | ||
1002 | * is bound to. | ||
1003 | * @dcr_host: A pointer to the DCR data containing the DCR mapping | 999 | * @dcr_host: A pointer to the DCR data containing the DCR mapping |
1004 | * for this controller instance. | 1000 | * for this controller instance. |
1005 | * @mcopt1: The 32-bit Memory Controller Option 1 register value | 1001 | * @mcopt1: The 32-bit Memory Controller Option 1 register value |
@@ -1015,7 +1011,6 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1) | |||
1015 | static int __devinit | 1011 | static int __devinit |
1016 | ppc4xx_edac_mc_init(struct mem_ctl_info *mci, | 1012 | ppc4xx_edac_mc_init(struct mem_ctl_info *mci, |
1017 | struct platform_device *op, | 1013 | struct platform_device *op, |
1018 | const struct of_device_id *match, | ||
1019 | const dcr_host_t *dcr_host, | 1014 | const dcr_host_t *dcr_host, |
1020 | u32 mcopt1) | 1015 | u32 mcopt1) |
1021 | { | 1016 | { |
@@ -1024,7 +1019,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci, | |||
1024 | struct ppc4xx_edac_pdata *pdata = NULL; | 1019 | struct ppc4xx_edac_pdata *pdata = NULL; |
1025 | const struct device_node *np = op->dev.of_node; | 1020 | const struct device_node *np = op->dev.of_node; |
1026 | 1021 | ||
1027 | if (match == NULL) | 1022 | if (op->dev.of_match == NULL) |
1028 | return -EINVAL; | 1023 | return -EINVAL; |
1029 | 1024 | ||
1030 | /* Initial driver pointers and private data */ | 1025 | /* Initial driver pointers and private data */ |
@@ -1227,9 +1222,6 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host) | |||
1227 | * ppc4xx_edac_probe - check controller and bind driver | 1222 | * ppc4xx_edac_probe - check controller and bind driver |
1228 | * @op: A pointer to the OpenFirmware device tree node associated | 1223 | * @op: A pointer to the OpenFirmware device tree node associated |
1229 | * with the controller being probed for driver binding. | 1224 | * with the controller being probed for driver binding. |
1230 | * @match: A pointer to the OpenFirmware device tree match | ||
1231 | * information associated with the controller being probed | ||
1232 | * for driver binding. | ||
1233 | * | 1225 | * |
1234 | * This routine probes a specific ibm,sdram-4xx-ddr2 controller | 1226 | * This routine probes a specific ibm,sdram-4xx-ddr2 controller |
1235 | * instance for binding with the driver. | 1227 | * instance for binding with the driver. |
@@ -1237,8 +1229,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host) | |||
1237 | * Returns 0 if the controller instance was successfully bound to the | 1229 | * Returns 0 if the controller instance was successfully bound to the |
1238 | * driver; otherwise, < 0 on error. | 1230 | * driver; otherwise, < 0 on error. |
1239 | */ | 1231 | */ |
1240 | static int __devinit | 1232 | static int __devinit ppc4xx_edac_probe(struct platform_device *op) |
1241 | ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match) | ||
1242 | { | 1233 | { |
1243 | int status = 0; | 1234 | int status = 0; |
1244 | u32 mcopt1, memcheck; | 1235 | u32 mcopt1, memcheck; |
@@ -1304,7 +1295,7 @@ ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match) | |||
1304 | goto done; | 1295 | goto done; |
1305 | } | 1296 | } |
1306 | 1297 | ||
1307 | status = ppc4xx_edac_mc_init(mci, op, match, &dcr_host, mcopt1); | 1298 | status = ppc4xx_edac_mc_init(mci, op, &dcr_host, mcopt1); |
1308 | 1299 | ||
1309 | if (status) { | 1300 | if (status) { |
1310 | ppc4xx_edac_mc_printk(KERN_ERR, mci, | 1301 | ppc4xx_edac_mc_printk(KERN_ERR, mci, |
@@ -1421,7 +1412,7 @@ ppc4xx_edac_init(void) | |||
1421 | 1412 | ||
1422 | ppc4xx_edac_opstate_init(); | 1413 | ppc4xx_edac_opstate_init(); |
1423 | 1414 | ||
1424 | return of_register_platform_driver(&ppc4xx_edac_driver); | 1415 | return platform_driver_register(&ppc4xx_edac_driver); |
1425 | } | 1416 | } |
1426 | 1417 | ||
1427 | /** | 1418 | /** |
@@ -1434,7 +1425,7 @@ ppc4xx_edac_init(void) | |||
1434 | static void __exit | 1425 | static void __exit |
1435 | ppc4xx_edac_exit(void) | 1426 | ppc4xx_edac_exit(void) |
1436 | { | 1427 | { |
1437 | of_unregister_platform_driver(&ppc4xx_edac_driver); | 1428 | platform_driver_unregister(&ppc4xx_edac_driver); |
1438 | } | 1429 | } |
1439 | 1430 | ||
1440 | module_init(ppc4xx_edac_init); | 1431 | module_init(ppc4xx_edac_init); |