diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:08:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:56 -0500 |
commit | c7c9e1c372452688f0ef2af794789bbd00f9fa51 (patch) | |
tree | 24f46d6b8a6393db716fda9fd94916c2faafd427 /drivers/char/hw_random/tx4939-rng.c | |
parent | 75096579c3ac39ddc2f8b0d9a8924eba31f4d920 (diff) |
char: 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.
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/char/hw_random/tx4939-rng.c')
-rw-r--r-- | drivers/char/hw_random/tx4939-rng.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/hw_random/tx4939-rng.c b/drivers/char/hw_random/tx4939-rng.c index de473ef3882b..30991989d65b 100644 --- a/drivers/char/hw_random/tx4939-rng.c +++ b/drivers/char/hw_random/tx4939-rng.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * License. See the file "COPYING" in the main directory of this archive | 7 | * License. See the file "COPYING" in the main directory of this archive |
8 | * for more details. | 8 | * for more details. |
9 | */ | 9 | */ |
10 | #include <linux/err.h> | ||
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
@@ -115,9 +116,9 @@ static int __init tx4939_rng_probe(struct platform_device *dev) | |||
115 | rngdev = devm_kzalloc(&dev->dev, sizeof(*rngdev), GFP_KERNEL); | 116 | rngdev = devm_kzalloc(&dev->dev, sizeof(*rngdev), GFP_KERNEL); |
116 | if (!rngdev) | 117 | if (!rngdev) |
117 | return -ENOMEM; | 118 | return -ENOMEM; |
118 | rngdev->base = devm_request_and_ioremap(&dev->dev, r); | 119 | rngdev->base = devm_ioremap_resource(&dev->dev, r); |
119 | if (!rngdev->base) | 120 | if (IS_ERR(rngdev->base)) |
120 | return -EBUSY; | 121 | return PTR_ERR(rngdev->base); |
121 | 122 | ||
122 | rngdev->rng.name = dev_name(&dev->dev); | 123 | rngdev->rng.name = dev_name(&dev->dev); |
123 | rngdev->rng.data_present = tx4939_rng_data_present; | 124 | rngdev->rng.data_present = tx4939_rng_data_present; |