diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:56 -0500 |
commit | 1684789f86cbd6a1aff82970992c711898b19995 (patch) | |
tree | 44508826c207445cd435ced69f8f414c2aebeb57 /drivers/misc/atmel-ssc.c | |
parent | 06303c2e00701724acb95069ca46f87c998c4be1 (diff) |
misc: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/atmel-ssc.c')
-rw-r--r-- | drivers/misc/atmel-ssc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 3c09cbb70b1d..c208238b890a 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
@@ -159,11 +159,9 @@ static int ssc_probe(struct platform_device *pdev) | |||
159 | return -ENXIO; | 159 | return -ENXIO; |
160 | } | 160 | } |
161 | 161 | ||
162 | ssc->regs = devm_request_and_ioremap(&pdev->dev, regs); | 162 | ssc->regs = devm_ioremap_resource(&pdev->dev, regs); |
163 | if (!ssc->regs) { | 163 | if (IS_ERR(ssc->regs)) |
164 | dev_dbg(&pdev->dev, "ioremap failed\n"); | 164 | return PTR_ERR(ssc->regs); |
165 | return -EINVAL; | ||
166 | } | ||
167 | 165 | ||
168 | ssc->phybase = regs->start; | 166 | ssc->phybase = regs->start; |
169 | 167 | ||