diff options
Diffstat (limited to 'drivers/mtd/maps/physmap.c')
-rw-r--r-- | drivers/mtd/maps/physmap.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index dfbf3f270cea..876dfab92847 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -251,14 +251,7 @@ static struct platform_driver physmap_flash_driver = { | |||
251 | }; | 251 | }; |
252 | 252 | ||
253 | 253 | ||
254 | #ifdef CONFIG_MTD_PHYSMAP_LEN | 254 | #ifdef CONFIG_MTD_PHYSMAP_COMPAT |
255 | #if CONFIG_MTD_PHYSMAP_LEN != 0 | ||
256 | #warning using PHYSMAP compat code | ||
257 | #define PHYSMAP_COMPAT | ||
258 | #endif | ||
259 | #endif | ||
260 | |||
261 | #ifdef PHYSMAP_COMPAT | ||
262 | static struct physmap_flash_data physmap_flash_data = { | 255 | static struct physmap_flash_data physmap_flash_data = { |
263 | .width = CONFIG_MTD_PHYSMAP_BANKWIDTH, | 256 | .width = CONFIG_MTD_PHYSMAP_BANKWIDTH, |
264 | }; | 257 | }; |
@@ -302,7 +295,7 @@ static int __init physmap_init(void) | |||
302 | int err; | 295 | int err; |
303 | 296 | ||
304 | err = platform_driver_register(&physmap_flash_driver); | 297 | err = platform_driver_register(&physmap_flash_driver); |
305 | #ifdef PHYSMAP_COMPAT | 298 | #ifdef CONFIG_MTD_PHYSMAP_COMPAT |
306 | if (err == 0) | 299 | if (err == 0) |
307 | platform_device_register(&physmap_flash); | 300 | platform_device_register(&physmap_flash); |
308 | #endif | 301 | #endif |
@@ -312,7 +305,7 @@ static int __init physmap_init(void) | |||
312 | 305 | ||
313 | static void __exit physmap_exit(void) | 306 | static void __exit physmap_exit(void) |
314 | { | 307 | { |
315 | #ifdef PHYSMAP_COMPAT | 308 | #ifdef CONFIG_MTD_PHYSMAP_COMPAT |
316 | platform_device_unregister(&physmap_flash); | 309 | platform_device_unregister(&physmap_flash); |
317 | #endif | 310 | #endif |
318 | platform_driver_unregister(&physmap_flash_driver); | 311 | platform_driver_unregister(&physmap_flash_driver); |
@@ -326,8 +319,7 @@ MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); | |||
326 | MODULE_DESCRIPTION("Generic configurable MTD map driver"); | 319 | MODULE_DESCRIPTION("Generic configurable MTD map driver"); |
327 | 320 | ||
328 | /* legacy platform drivers can't hotplug or coldplg */ | 321 | /* legacy platform drivers can't hotplug or coldplg */ |
329 | #ifndef PHYSMAP_COMPAT | 322 | #ifndef CONFIG_MTD_PHYSMAP_COMPAT |
330 | /* work with hotplug and coldplug */ | 323 | /* work with hotplug and coldplug */ |
331 | MODULE_ALIAS("platform:physmap-flash"); | 324 | MODULE_ALIAS("platform:physmap-flash"); |
332 | #endif | 325 | #endif |
333 | |||