diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 15:05:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 15:05:51 -0500 |
commit | 06991c28f37ad68e5c03777f5c3b679b56e3dac1 (patch) | |
tree | 4be75788e21c3c644fe6d39abf47693a171cf4f8 /drivers/mtd | |
parent | 460dc1eecf37263c8e3b17685ef236f0d236facb (diff) | |
parent | 74fef7a8fd1d2bd94f925d6638bb4c3049e7c381 (diff) |
Merge tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core patches from Greg Kroah-Hartman:
"Here is the big driver core merge for 3.9-rc1
There are two major series here, both of which touch lots of drivers
all over the kernel, and will cause you some merge conflicts:
- add a new function called devm_ioremap_resource() to properly be
able to check return values.
- remove CONFIG_EXPERIMENTAL
Other than those patches, there's not much here, some minor fixes and
updates"
Fix up trivial conflicts
* tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
base: memory: fix soft/hard_offline_page permissions
drivercore: Fix ordering between deferred_probe and exiting initcalls
backlight: fix class_find_device() arguments
TTY: mark tty_get_device call with the proper const values
driver-core: constify data for class_find_device()
firmware: Ignore abort check when no user-helper is used
firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
firmware: Make user-mode helper optional
firmware: Refactoring for splitting user-mode helper code
Driver core: treat unregistered bus_types as having no devices
watchdog: Convert to devm_ioremap_resource()
thermal: Convert to devm_ioremap_resource()
spi: Convert to devm_ioremap_resource()
power: Convert to devm_ioremap_resource()
mtd: Convert to devm_ioremap_resource()
mmc: Convert to devm_ioremap_resource()
mfd: Convert to devm_ioremap_resource()
media: Convert to devm_ioremap_resource()
iommu: Convert to devm_ioremap_resource()
drm: Convert to devm_ioremap_resource()
...
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/chips/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/Kconfig | 4 | ||||
-rw-r--r-- | drivers/mtd/devices/spear_smi.c | 7 | ||||
-rw-r--r-- | drivers/mtd/maps/autcpu12-nvram.c | 9 | ||||
-rw-r--r-- | drivers/mtd/maps/lantiq-flash.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/Kconfig | 7 | ||||
-rw-r--r-- | drivers/mtd/nand/fsmc_nand.c | 33 | ||||
-rw-r--r-- | drivers/mtd/nand/lpc32xx_mlc.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/lpc32xx_slc.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 12 | ||||
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 7 | ||||
-rw-r--r-- | drivers/mtd/nand/txx9ndfmc.c | 7 |
13 files changed, 51 insertions, 64 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 73fcbbeb78d0..03f2eb5627ec 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig | |||
@@ -291,7 +291,7 @@ config SSFDC | |||
291 | 291 | ||
292 | config SM_FTL | 292 | config SM_FTL |
293 | tristate "SmartMedia/xD new translation layer" | 293 | tristate "SmartMedia/xD new translation layer" |
294 | depends on EXPERIMENTAL && BLOCK | 294 | depends on BLOCK |
295 | select MTD_BLKDEVS | 295 | select MTD_BLKDEVS |
296 | select MTD_NAND_ECC | 296 | select MTD_NAND_ECC |
297 | help | 297 | help |
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig index e469b01d40d2..c219e3d098d9 100644 --- a/drivers/mtd/chips/Kconfig +++ b/drivers/mtd/chips/Kconfig | |||
@@ -225,7 +225,7 @@ config MTD_ABSENT | |||
225 | 225 | ||
226 | config MTD_XIP | 226 | config MTD_XIP |
227 | bool "XIP aware MTD support" | 227 | bool "XIP aware MTD support" |
228 | depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL && ARCH_MTD_XIP | 228 | depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && ARCH_MTD_XIP |
229 | default y if XIP_KERNEL | 229 | default y if XIP_KERNEL |
230 | help | 230 | help |
231 | This allows MTD support to work with flash memory which is also | 231 | This allows MTD support to work with flash memory which is also |
diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig index 46dcb54c32ec..12311f506ca1 100644 --- a/drivers/mtd/devices/Kconfig +++ b/drivers/mtd/devices/Kconfig | |||
@@ -52,7 +52,7 @@ config MTD_MS02NV | |||
52 | 52 | ||
53 | config MTD_DATAFLASH | 53 | config MTD_DATAFLASH |
54 | tristate "Support for AT45xxx DataFlash" | 54 | tristate "Support for AT45xxx DataFlash" |
55 | depends on SPI_MASTER && EXPERIMENTAL | 55 | depends on SPI_MASTER |
56 | help | 56 | help |
57 | This enables access to AT45xxx DataFlash chips, using SPI. | 57 | This enables access to AT45xxx DataFlash chips, using SPI. |
58 | Sometimes DataFlash chips are packaged inside MMC-format | 58 | Sometimes DataFlash chips are packaged inside MMC-format |
@@ -81,7 +81,7 @@ config MTD_DATAFLASH_OTP | |||
81 | 81 | ||
82 | config MTD_M25P80 | 82 | config MTD_M25P80 |
83 | tristate "Support most SPI Flash chips (AT26DF, M25P, W25X, ...)" | 83 | tristate "Support most SPI Flash chips (AT26DF, M25P, W25X, ...)" |
84 | depends on SPI_MASTER && EXPERIMENTAL | 84 | depends on SPI_MASTER |
85 | help | 85 | help |
86 | This enables access to most modern SPI flash chips, used for | 86 | This enables access to most modern SPI flash chips, used for |
87 | program and data storage. Series supported include Atmel AT26DF, | 87 | program and data storage. Series supported include Atmel AT26DF, |
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index 2aabd96bf0ff..8a82b8bc21e1 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c | |||
@@ -949,10 +949,9 @@ static int spear_smi_probe(struct platform_device *pdev) | |||
949 | 949 | ||
950 | smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 950 | smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
951 | 951 | ||
952 | dev->io_base = devm_request_and_ioremap(&pdev->dev, smi_base); | 952 | dev->io_base = devm_ioremap_resource(&pdev->dev, smi_base); |
953 | if (!dev->io_base) { | 953 | if (IS_ERR(dev->io_base)) { |
954 | ret = -EIO; | 954 | ret = PTR_ERR(dev->io_base); |
955 | dev_err(&pdev->dev, "devm_request_and_ioremap fail\n"); | ||
956 | goto err; | 955 | goto err; |
957 | } | 956 | } |
958 | 957 | ||
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 | ||
diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c index 3c3c791eb96a..d1da6ede3845 100644 --- a/drivers/mtd/maps/lantiq-flash.c +++ b/drivers/mtd/maps/lantiq-flash.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | 7 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/err.h> | ||
10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
11 | #include <linux/types.h> | 12 | #include <linux/types.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
@@ -136,10 +137,9 @@ ltq_mtd_probe(struct platform_device *pdev) | |||
136 | ltq_mtd->map = kzalloc(sizeof(struct map_info), GFP_KERNEL); | 137 | ltq_mtd->map = kzalloc(sizeof(struct map_info), GFP_KERNEL); |
137 | ltq_mtd->map->phys = ltq_mtd->res->start; | 138 | ltq_mtd->map->phys = ltq_mtd->res->start; |
138 | ltq_mtd->map->size = resource_size(ltq_mtd->res); | 139 | ltq_mtd->map->size = resource_size(ltq_mtd->res); |
139 | ltq_mtd->map->virt = devm_request_and_ioremap(&pdev->dev, ltq_mtd->res); | 140 | ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res); |
140 | if (!ltq_mtd->map->virt) { | 141 | if (IS_ERR(ltq_mtd->map->virt)) { |
141 | dev_err(&pdev->dev, "failed to remap mem resource\n"); | 142 | err = PTR_ERR(ltq_mtd->map->virt); |
142 | err = -EBUSY; | ||
143 | goto err_out; | 143 | goto err_out; |
144 | } | 144 | } |
145 | 145 | ||
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 5819eb575210..81bf5e52601e 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -260,8 +260,7 @@ config MTD_NAND_S3C2410_CLKSTOP | |||
260 | approximately 5mA of power when there is nothing happening. | 260 | approximately 5mA of power when there is nothing happening. |
261 | 261 | ||
262 | config MTD_NAND_DISKONCHIP | 262 | config MTD_NAND_DISKONCHIP |
263 | tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation) (EXPERIMENTAL)" | 263 | tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)" |
264 | depends on EXPERIMENTAL | ||
265 | depends on HAS_IOMEM | 264 | depends on HAS_IOMEM |
266 | select REED_SOLOMON | 265 | select REED_SOLOMON |
267 | select REED_SOLOMON_DEC16 | 266 | select REED_SOLOMON_DEC16 |
@@ -331,8 +330,8 @@ config MTD_NAND_DISKONCHIP_BBTWRITE | |||
331 | parameter "inftl_bbt_write=1". | 330 | parameter "inftl_bbt_write=1". |
332 | 331 | ||
333 | config MTD_NAND_DOCG4 | 332 | config MTD_NAND_DOCG4 |
334 | tristate "Support for DiskOnChip G4 (EXPERIMENTAL)" | 333 | tristate "Support for DiskOnChip G4" |
335 | depends on EXPERIMENTAL && HAS_IOMEM | 334 | depends on HAS_IOMEM |
336 | select BCH | 335 | select BCH |
337 | select BITREVERSE | 336 | select BITREVERSE |
338 | help | 337 | help |
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 67e62d3d495c..c543cc09f193 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c | |||
@@ -937,42 +937,35 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) | |||
937 | if (!res) | 937 | if (!res) |
938 | return -EINVAL; | 938 | return -EINVAL; |
939 | 939 | ||
940 | host->data_va = devm_request_and_ioremap(&pdev->dev, res); | 940 | host->data_va = devm_ioremap_resource(&pdev->dev, res); |
941 | if (!host->data_va) { | 941 | if (IS_ERR(host->data_va)) |
942 | dev_err(&pdev->dev, "data ioremap failed\n"); | 942 | return PTR_ERR(host->data_va); |
943 | return -ENOMEM; | 943 | |
944 | } | ||
945 | host->data_pa = (dma_addr_t)res->start; | 944 | host->data_pa = (dma_addr_t)res->start; |
946 | 945 | ||
947 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_addr"); | 946 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_addr"); |
948 | if (!res) | 947 | if (!res) |
949 | return -EINVAL; | 948 | return -EINVAL; |
950 | 949 | ||
951 | host->addr_va = devm_request_and_ioremap(&pdev->dev, res); | 950 | host->addr_va = devm_ioremap_resource(&pdev->dev, res); |
952 | if (!host->addr_va) { | 951 | if (IS_ERR(host->addr_va)) |
953 | dev_err(&pdev->dev, "ale ioremap failed\n"); | 952 | return PTR_ERR(host->addr_va); |
954 | return -ENOMEM; | ||
955 | } | ||
956 | 953 | ||
957 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_cmd"); | 954 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_cmd"); |
958 | if (!res) | 955 | if (!res) |
959 | return -EINVAL; | 956 | return -EINVAL; |
960 | 957 | ||
961 | host->cmd_va = devm_request_and_ioremap(&pdev->dev, res); | 958 | host->cmd_va = devm_ioremap_resource(&pdev->dev, res); |
962 | if (!host->cmd_va) { | 959 | if (IS_ERR(host->cmd_va)) |
963 | dev_err(&pdev->dev, "ale ioremap failed\n"); | 960 | return PTR_ERR(host->cmd_va); |
964 | return -ENOMEM; | ||
965 | } | ||
966 | 961 | ||
967 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fsmc_regs"); | 962 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fsmc_regs"); |
968 | if (!res) | 963 | if (!res) |
969 | return -EINVAL; | 964 | return -EINVAL; |
970 | 965 | ||
971 | host->regs_va = devm_request_and_ioremap(&pdev->dev, res); | 966 | host->regs_va = devm_ioremap_resource(&pdev->dev, res); |
972 | if (!host->regs_va) { | 967 | if (IS_ERR(host->regs_va)) |
973 | dev_err(&pdev->dev, "regs ioremap failed\n"); | 968 | return PTR_ERR(host->regs_va); |
974 | return -ENOMEM; | ||
975 | } | ||
976 | 969 | ||
977 | host->clk = clk_get(&pdev->dev, NULL); | 970 | host->clk = clk_get(&pdev->dev, NULL); |
978 | if (IS_ERR(host->clk)) { | 971 | if (IS_ERR(host->clk)) { |
diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c index f182befa7360..0ca22ae9135c 100644 --- a/drivers/mtd/nand/lpc32xx_mlc.c +++ b/drivers/mtd/nand/lpc32xx_mlc.c | |||
@@ -677,11 +677,10 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
677 | return -ENXIO; | 677 | return -ENXIO; |
678 | } | 678 | } |
679 | 679 | ||
680 | host->io_base = devm_request_and_ioremap(&pdev->dev, rc); | 680 | host->io_base = devm_ioremap_resource(&pdev->dev, rc); |
681 | if (host->io_base == NULL) { | 681 | if (IS_ERR(host->io_base)) |
682 | dev_err(&pdev->dev, "ioremap failed\n"); | 682 | return PTR_ERR(host->io_base); |
683 | return -EIO; | 683 | |
684 | } | ||
685 | host->io_base_phy = rc->start; | 684 | host->io_base_phy = rc->start; |
686 | 685 | ||
687 | mtd = &host->mtd; | 686 | mtd = &host->mtd; |
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index 030b78c62895..be94ed5abefb 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c | |||
@@ -778,11 +778,9 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) | |||
778 | } | 778 | } |
779 | host->io_base_dma = rc->start; | 779 | host->io_base_dma = rc->start; |
780 | 780 | ||
781 | host->io_base = devm_request_and_ioremap(&pdev->dev, rc); | 781 | host->io_base = devm_ioremap_resource(&pdev->dev, rc); |
782 | if (host->io_base == NULL) { | 782 | if (IS_ERR(host->io_base)) |
783 | dev_err(&pdev->dev, "ioremap failed\n"); | 783 | return PTR_ERR(host->io_base); |
784 | return -ENOMEM; | ||
785 | } | ||
786 | 784 | ||
787 | if (pdev->dev.of_node) | 785 | if (pdev->dev.of_node) |
788 | host->ncfg = lpc32xx_parse_dt(&pdev->dev); | 786 | host->ncfg = lpc32xx_parse_dt(&pdev->dev); |
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 45204e41a028..60ac5b98b718 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
@@ -1437,9 +1437,9 @@ static int mxcnd_probe(struct platform_device *pdev) | |||
1437 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1437 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1438 | if (!res) | 1438 | if (!res) |
1439 | return -ENODEV; | 1439 | return -ENODEV; |
1440 | host->regs_ip = devm_request_and_ioremap(&pdev->dev, res); | 1440 | host->regs_ip = devm_ioremap_resource(&pdev->dev, res); |
1441 | if (!host->regs_ip) | 1441 | if (IS_ERR(host->regs_ip)) |
1442 | return -ENOMEM; | 1442 | return PTR_ERR(host->regs_ip); |
1443 | 1443 | ||
1444 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 1444 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
1445 | } else { | 1445 | } else { |
@@ -1449,9 +1449,9 @@ static int mxcnd_probe(struct platform_device *pdev) | |||
1449 | if (!res) | 1449 | if (!res) |
1450 | return -ENODEV; | 1450 | return -ENODEV; |
1451 | 1451 | ||
1452 | host->base = devm_request_and_ioremap(&pdev->dev, res); | 1452 | host->base = devm_ioremap_resource(&pdev->dev, res); |
1453 | if (!host->base) | 1453 | if (IS_ERR(host->base)) |
1454 | return -ENOMEM; | 1454 | return PTR_ERR(host->base); |
1455 | 1455 | ||
1456 | host->main_area0 = host->base; | 1456 | host->main_area0 = host->base; |
1457 | 1457 | ||
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index df954b4dcba2..d65afd23e171 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -952,10 +952,9 @@ static int s3c24xx_nand_probe(struct platform_device *pdev) | |||
952 | info->platform = plat; | 952 | info->platform = plat; |
953 | info->cpu_type = cpu_type; | 953 | info->cpu_type = cpu_type; |
954 | 954 | ||
955 | info->regs = devm_request_and_ioremap(&pdev->dev, res); | 955 | info->regs = devm_ioremap_resource(&pdev->dev, res); |
956 | if (info->regs == NULL) { | 956 | if (IS_ERR(info->regs)) { |
957 | dev_err(&pdev->dev, "cannot reserve register region\n"); | 957 | err = PTR_ERR(info->regs); |
958 | err = -EIO; | ||
959 | goto exit_error; | 958 | goto exit_error; |
960 | } | 959 | } |
961 | 960 | ||
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c index e3d7266e256f..e1e8748aa47b 100644 --- a/drivers/mtd/nand/txx9ndfmc.c +++ b/drivers/mtd/nand/txx9ndfmc.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * (C) Copyright TOSHIBA CORPORATION 2004-2007 | 9 | * (C) Copyright TOSHIBA CORPORATION 2004-2007 |
10 | * All Rights Reserved. | 10 | * All Rights Reserved. |
11 | */ | 11 | */ |
12 | #include <linux/err.h> | ||
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
@@ -286,9 +287,9 @@ static int __init txx9ndfmc_probe(struct platform_device *dev) | |||
286 | drvdata = devm_kzalloc(&dev->dev, sizeof(*drvdata), GFP_KERNEL); | 287 | drvdata = devm_kzalloc(&dev->dev, sizeof(*drvdata), GFP_KERNEL); |
287 | if (!drvdata) | 288 | if (!drvdata) |
288 | return -ENOMEM; | 289 | return -ENOMEM; |
289 | drvdata->base = devm_request_and_ioremap(&dev->dev, res); | 290 | drvdata->base = devm_ioremap_resource(&dev->dev, res); |
290 | if (!drvdata->base) | 291 | if (IS_ERR(drvdata->base)) |
291 | return -EBUSY; | 292 | return PTR_ERR(drvdata->base); |
292 | 293 | ||
293 | hold = plat->hold ?: 20; /* tDH */ | 294 | hold = plat->hold ?: 20; /* tDH */ |
294 | spw = plat->spw ?: 90; /* max(tREADID, tWP, tRP) */ | 295 | spw = plat->spw ?: 90; /* max(tREADID, tWP, tRP) */ |