diff options
Diffstat (limited to 'drivers/watchdog/txx9wdt.c')
-rw-r--r-- | drivers/watchdog/txx9wdt.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c index 98e16373e640..88f23c5cfddb 100644 --- a/drivers/watchdog/txx9wdt.c +++ b/drivers/watchdog/txx9wdt.c | |||
@@ -121,9 +121,9 @@ static int __init txx9wdt_probe(struct platform_device *dev) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); | 123 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
124 | txx9wdt_reg = devm_request_and_ioremap(&dev->dev, res); | 124 | txx9wdt_reg = devm_ioremap_resource(&dev->dev, res); |
125 | if (!txx9wdt_reg) { | 125 | if (IS_ERR(txx9wdt_reg)) { |
126 | ret = -EBUSY; | 126 | ret = PTR_ERR(txx9wdt_reg); |
127 | goto exit; | 127 | goto exit; |
128 | } | 128 | } |
129 | 129 | ||
@@ -172,18 +172,7 @@ static struct platform_driver txx9wdt_driver = { | |||
172 | }, | 172 | }, |
173 | }; | 173 | }; |
174 | 174 | ||
175 | static int __init watchdog_init(void) | 175 | module_platform_driver_probe(txx9wdt_driver, txx9wdt_probe); |
176 | { | ||
177 | return platform_driver_probe(&txx9wdt_driver, txx9wdt_probe); | ||
178 | } | ||
179 | |||
180 | static void __exit watchdog_exit(void) | ||
181 | { | ||
182 | platform_driver_unregister(&txx9wdt_driver); | ||
183 | } | ||
184 | |||
185 | module_init(watchdog_init); | ||
186 | module_exit(watchdog_exit); | ||
187 | 176 | ||
188 | MODULE_DESCRIPTION("TXx9 Watchdog Driver"); | 177 | MODULE_DESCRIPTION("TXx9 Watchdog Driver"); |
189 | MODULE_LICENSE("GPL"); | 178 | MODULE_LICENSE("GPL"); |