diff options
Diffstat (limited to 'drivers/mmc/wbsd.c')
-rw-r--r-- | drivers/mmc/wbsd.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 9df0ddeb3ff9..4f13bd2ccf9a 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -2087,10 +2087,20 @@ static int __init wbsd_drv_init(void) | |||
2087 | if (result < 0) | 2087 | if (result < 0) |
2088 | return result; | 2088 | return result; |
2089 | 2089 | ||
2090 | wbsd_device = platform_device_register_simple(DRIVER_NAME, -1, | 2090 | wbsd_device = platform_device_alloc(DRIVER_NAME, -1); |
2091 | NULL, 0); | 2091 | if (!wbsd_device) |
2092 | if (IS_ERR(wbsd_device)) | 2092 | { |
2093 | return PTR_ERR(wbsd_device); | 2093 | platform_driver_unregister(&wbsd_driver); |
2094 | return -ENOMEM; | ||
2095 | } | ||
2096 | |||
2097 | result = platform_device_add(wbsd_device); | ||
2098 | if (result) | ||
2099 | { | ||
2100 | platform_device_put(wbsd_device); | ||
2101 | platform_driver_unregister(&wbsd_driver); | ||
2102 | return result; | ||
2103 | } | ||
2094 | } | 2104 | } |
2095 | 2105 | ||
2096 | return 0; | 2106 | return 0; |