diff options
Diffstat (limited to 'drivers/mtd/maps/autcpu12-nvram.c')
-rw-r--r-- | drivers/mtd/maps/autcpu12-nvram.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mtd/maps/autcpu12-nvram.c b/drivers/mtd/maps/autcpu12-nvram.c index a2dc2ae4b24e..c3525d2a2fa8 100644 --- a/drivers/mtd/maps/autcpu12-nvram.c +++ b/drivers/mtd/maps/autcpu12-nvram.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | */ | 18 | */ |
19 | #include <linux/err.h> | ||
19 | #include <linux/sizes.h> | 20 | #include <linux/sizes.h> |
20 | 21 | ||
21 | #include <linux/types.h> | 22 | #include <linux/types.h> |
@@ -55,12 +56,10 @@ static int autcpu12_nvram_probe(struct platform_device *pdev) | |||
55 | priv->map.bankwidth = 4; | 56 | priv->map.bankwidth = 4; |
56 | priv->map.phys = res->start; | 57 | priv->map.phys = res->start; |
57 | priv->map.size = resource_size(res); | 58 | priv->map.size = resource_size(res); |
58 | priv->map.virt = devm_request_and_ioremap(&pdev->dev, res); | 59 | priv->map.virt = devm_ioremap_resource(&pdev->dev, res); |
59 | strcpy((char *)priv->map.name, res->name); | 60 | strcpy((char *)priv->map.name, res->name); |
60 | if (!priv->map.virt) { | 61 | if (IS_ERR(priv->map.virt)) |
61 | dev_err(&pdev->dev, "failed to remap mem resource\n"); | 62 | return PTR_ERR(priv->map.virt); |
62 | return -EBUSY; | ||
63 | } | ||
64 | 63 | ||
65 | simple_map_init(&priv->map); | 64 | simple_map_init(&priv->map); |
66 | 65 | ||