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/mtd/maps | |
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/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 15 | ||||
-rw-r--r-- | drivers/mtd/maps/sun_uflash.c | 8 |
2 files changed, 13 insertions, 10 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 8506578e6a35..3db0cb083d31 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -216,8 +216,7 @@ static void __devinit of_free_probes(const char **probes) | |||
216 | } | 216 | } |
217 | #endif | 217 | #endif |
218 | 218 | ||
219 | static int __devinit of_flash_probe(struct platform_device *dev, | 219 | static int __devinit of_flash_probe(struct platform_device *dev) |
220 | const struct of_device_id *match) | ||
221 | { | 220 | { |
222 | #ifdef CONFIG_MTD_PARTITIONS | 221 | #ifdef CONFIG_MTD_PARTITIONS |
223 | const char **part_probe_types; | 222 | const char **part_probe_types; |
@@ -225,7 +224,7 @@ static int __devinit of_flash_probe(struct platform_device *dev, | |||
225 | struct device_node *dp = dev->dev.of_node; | 224 | struct device_node *dp = dev->dev.of_node; |
226 | struct resource res; | 225 | struct resource res; |
227 | struct of_flash *info; | 226 | struct of_flash *info; |
228 | const char *probe_type = match->data; | 227 | const char *probe_type; |
229 | const __be32 *width; | 228 | const __be32 *width; |
230 | int err; | 229 | int err; |
231 | int i; | 230 | int i; |
@@ -235,6 +234,10 @@ static int __devinit of_flash_probe(struct platform_device *dev, | |||
235 | struct mtd_info **mtd_list = NULL; | 234 | struct mtd_info **mtd_list = NULL; |
236 | resource_size_t res_size; | 235 | resource_size_t res_size; |
237 | 236 | ||
237 | if (!dev->dev.of_match) | ||
238 | return -EINVAL; | ||
239 | probe_type = dev->dev.of_match->data; | ||
240 | |||
238 | reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); | 241 | reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); |
239 | 242 | ||
240 | /* | 243 | /* |
@@ -418,7 +421,7 @@ static struct of_device_id of_flash_match[] = { | |||
418 | }; | 421 | }; |
419 | MODULE_DEVICE_TABLE(of, of_flash_match); | 422 | MODULE_DEVICE_TABLE(of, of_flash_match); |
420 | 423 | ||
421 | static struct of_platform_driver of_flash_driver = { | 424 | static struct platform_driver of_flash_driver = { |
422 | .driver = { | 425 | .driver = { |
423 | .name = "of-flash", | 426 | .name = "of-flash", |
424 | .owner = THIS_MODULE, | 427 | .owner = THIS_MODULE, |
@@ -430,12 +433,12 @@ static struct of_platform_driver of_flash_driver = { | |||
430 | 433 | ||
431 | static int __init of_flash_init(void) | 434 | static int __init of_flash_init(void) |
432 | { | 435 | { |
433 | return of_register_platform_driver(&of_flash_driver); | 436 | return platform_driver_register(&of_flash_driver); |
434 | } | 437 | } |
435 | 438 | ||
436 | static void __exit of_flash_exit(void) | 439 | static void __exit of_flash_exit(void) |
437 | { | 440 | { |
438 | of_unregister_platform_driver(&of_flash_driver); | 441 | platform_driver_unregister(&of_flash_driver); |
439 | } | 442 | } |
440 | 443 | ||
441 | module_init(of_flash_init); | 444 | module_init(of_flash_init); |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 3582ba1f9b09..3f1cb328a574 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -108,7 +108,7 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp) | |||
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match) | 111 | static int __devinit uflash_probe(struct platform_device *op) |
112 | { | 112 | { |
113 | struct device_node *dp = op->dev.of_node; | 113 | struct device_node *dp = op->dev.of_node; |
114 | 114 | ||
@@ -148,7 +148,7 @@ static const struct of_device_id uflash_match[] = { | |||
148 | 148 | ||
149 | MODULE_DEVICE_TABLE(of, uflash_match); | 149 | MODULE_DEVICE_TABLE(of, uflash_match); |
150 | 150 | ||
151 | static struct of_platform_driver uflash_driver = { | 151 | static struct platform_driver uflash_driver = { |
152 | .driver = { | 152 | .driver = { |
153 | .name = DRIVER_NAME, | 153 | .name = DRIVER_NAME, |
154 | .owner = THIS_MODULE, | 154 | .owner = THIS_MODULE, |
@@ -160,12 +160,12 @@ static struct of_platform_driver uflash_driver = { | |||
160 | 160 | ||
161 | static int __init uflash_init(void) | 161 | static int __init uflash_init(void) |
162 | { | 162 | { |
163 | return of_register_platform_driver(&uflash_driver); | 163 | return platform_driver_register(&uflash_driver); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void __exit uflash_exit(void) | 166 | static void __exit uflash_exit(void) |
167 | { | 167 | { |
168 | of_unregister_platform_driver(&uflash_driver); | 168 | platform_driver_unregister(&uflash_driver); |
169 | } | 169 | } |
170 | 170 | ||
171 | module_init(uflash_init); | 171 | module_init(uflash_init); |