diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc-onenand.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/id.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 2 |
11 files changed, 23 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 0ce91af753fa..fff141330a63 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -479,7 +479,7 @@ static int __init beagle_opp_init(void) | |||
479 | 479 | ||
480 | /* Initialize the omap3 opp table if not already created. */ | 480 | /* Initialize the omap3 opp table if not already created. */ |
481 | r = omap3_opp_init(); | 481 | r = omap3_opp_init(); |
482 | if (IS_ERR_VALUE(r) && (r != -EEXIST)) { | 482 | if (r < 0 && (r != -EEXIST)) { |
483 | pr_err("%s: opp default init failed\n", __func__); | 483 | pr_err("%s: opp default init failed\n", __func__); |
484 | return r; | 484 | return r; |
485 | } | 485 | } |
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 8474c7d228ee..0c38ca96c840 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -611,7 +611,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name) | |||
611 | return -ENOENT; | 611 | return -ENOENT; |
612 | 612 | ||
613 | r = clk_set_rate(mpurate_ck, mpurate); | 613 | r = clk_set_rate(mpurate_ck, mpurate); |
614 | if (IS_ERR_VALUE(r)) { | 614 | if (r < 0) { |
615 | WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", | 615 | WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", |
616 | mpurate_ck_name, mpurate, r); | 616 | mpurate_ck_name, mpurate, r); |
617 | clk_put(mpurate_ck); | 617 | clk_put(mpurate_ck); |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index fadd87435cd0..0d75889c0a6f 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -303,7 +303,7 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base) | |||
303 | t = omap2_onenand_calc_async_timings(); | 303 | t = omap2_onenand_calc_async_timings(); |
304 | 304 | ||
305 | ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t); | 305 | ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t); |
306 | if (IS_ERR_VALUE(ret)) | 306 | if (ret < 0) |
307 | return ret; | 307 | return ret; |
308 | 308 | ||
309 | omap2_onenand_set_async_mode(onenand_base); | 309 | omap2_onenand_set_async_mode(onenand_base); |
@@ -325,7 +325,7 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr) | |||
325 | t = omap2_onenand_calc_sync_timings(gpmc_onenand_data, freq); | 325 | t = omap2_onenand_calc_sync_timings(gpmc_onenand_data, freq); |
326 | 326 | ||
327 | ret = gpmc_set_sync_mode(gpmc_onenand_data->cs, &t); | 327 | ret = gpmc_set_sync_mode(gpmc_onenand_data->cs, &t); |
328 | if (IS_ERR_VALUE(ret)) | 328 | if (ret < 0) |
329 | return ret; | 329 | return ret; |
330 | 330 | ||
331 | set_onenand_cfg(onenand_base); | 331 | set_onenand_cfg(onenand_base); |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 410e1bac7815..6de31739b45c 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -716,7 +716,7 @@ static int gpmc_setup_irq(void) | |||
716 | return -EINVAL; | 716 | return -EINVAL; |
717 | 717 | ||
718 | gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0); | 718 | gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0); |
719 | if (IS_ERR_VALUE(gpmc_irq_start)) { | 719 | if (gpmc_irq_start < 0) { |
720 | pr_err("irq_alloc_descs failed\n"); | 720 | pr_err("irq_alloc_descs failed\n"); |
721 | return gpmc_irq_start; | 721 | return gpmc_irq_start; |
722 | } | 722 | } |
@@ -801,7 +801,7 @@ static int gpmc_mem_init(void) | |||
801 | continue; | 801 | continue; |
802 | gpmc_cs_get_memconf(cs, &base, &size); | 802 | gpmc_cs_get_memconf(cs, &base, &size); |
803 | rc = gpmc_cs_insert_mem(cs, base, size); | 803 | rc = gpmc_cs_insert_mem(cs, base, size); |
804 | if (IS_ERR_VALUE(rc)) { | 804 | if (rc < 0) { |
805 | while (--cs >= 0) | 805 | while (--cs >= 0) |
806 | if (gpmc_cs_mem_enabled(cs)) | 806 | if (gpmc_cs_mem_enabled(cs)) |
807 | gpmc_cs_delete_mem(cs); | 807 | gpmc_cs_delete_mem(cs); |
@@ -1370,14 +1370,14 @@ static int gpmc_probe(struct platform_device *pdev) | |||
1370 | GPMC_REVISION_MINOR(l)); | 1370 | GPMC_REVISION_MINOR(l)); |
1371 | 1371 | ||
1372 | rc = gpmc_mem_init(); | 1372 | rc = gpmc_mem_init(); |
1373 | if (IS_ERR_VALUE(rc)) { | 1373 | if (rc < 0) { |
1374 | clk_disable_unprepare(gpmc_l3_clk); | 1374 | clk_disable_unprepare(gpmc_l3_clk); |
1375 | clk_put(gpmc_l3_clk); | 1375 | clk_put(gpmc_l3_clk); |
1376 | dev_err(gpmc_dev, "failed to reserve memory\n"); | 1376 | dev_err(gpmc_dev, "failed to reserve memory\n"); |
1377 | return rc; | 1377 | return rc; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | if (IS_ERR_VALUE(gpmc_setup_irq())) | 1380 | if (gpmc_setup_irq() < 0) |
1381 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); | 1381 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); |
1382 | 1382 | ||
1383 | /* Now the GPMC is initialised, unreserve the chip-selects */ | 1383 | /* Now the GPMC is initialised, unreserve the chip-selects */ |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 2fb17caa8683..0f4c18e6e60c 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -314,7 +314,7 @@ void __init omap3xxx_check_revision(void) | |||
314 | * If the processor type is Cortex-A8 and the revision is 0x0 | 314 | * If the processor type is Cortex-A8 and the revision is 0x0 |
315 | * it means its Cortex r0p0 which is 3430 ES1.0. | 315 | * it means its Cortex r0p0 which is 3430 ES1.0. |
316 | */ | 316 | */ |
317 | cpuid = read_cpuid(CPUID_ID); | 317 | cpuid = read_cpuid_id(); |
318 | if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) { | 318 | if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) { |
319 | omap_revision = OMAP3430_REV_ES1_0; | 319 | omap_revision = OMAP3430_REV_ES1_0; |
320 | cpu_rev = "1.0"; | 320 | cpu_rev = "1.0"; |
@@ -475,7 +475,7 @@ void __init omap4xxx_check_revision(void) | |||
475 | * Use ARM register to detect the correct ES version | 475 | * Use ARM register to detect the correct ES version |
476 | */ | 476 | */ |
477 | if (!rev && (hawkeye != 0xb94e) && (hawkeye != 0xb975)) { | 477 | if (!rev && (hawkeye != 0xb94e) && (hawkeye != 0xb975)) { |
478 | idcode = read_cpuid(CPUID_ID); | 478 | idcode = read_cpuid_id(); |
479 | rev = (idcode & 0xf) - 1; | 479 | rev = (idcode & 0xf) - 1; |
480 | } | 480 | } |
481 | 481 | ||
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 61174b78dee6..2a551f997aea 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -174,7 +174,7 @@ static void __init omap4_smp_init_cpus(void) | |||
174 | unsigned int i = 0, ncores = 1, cpu_id; | 174 | unsigned int i = 0, ncores = 1, cpu_id; |
175 | 175 | ||
176 | /* Use ARM cpuid check here, as SoC detection will not work so early */ | 176 | /* Use ARM cpuid check here, as SoC detection will not work so early */ |
177 | cpu_id = read_cpuid(CPUID_ID) & CPU_MASK; | 177 | cpu_id = read_cpuid_id() & CPU_MASK; |
178 | if (cpu_id == CPU_CORTEX_A9) { | 178 | if (cpu_id == CPU_CORTEX_A9) { |
179 | /* | 179 | /* |
180 | * Currently we can't call ioremap here because | 180 | * Currently we can't call ioremap here because |
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 381be7ac0c17..eeea4fa28fbc 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -131,7 +131,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
131 | int oh_cnt, i, ret = 0; | 131 | int oh_cnt, i, ret = 0; |
132 | 132 | ||
133 | oh_cnt = of_property_count_strings(node, "ti,hwmods"); | 133 | oh_cnt = of_property_count_strings(node, "ti,hwmods"); |
134 | if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) { | 134 | if (oh_cnt <= 0) { |
135 | dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n"); | 135 | dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n"); |
136 | return -ENODEV; | 136 | return -ENODEV; |
137 | } | 137 | } |
@@ -815,20 +815,17 @@ struct device *omap_device_get_by_hwmod_name(const char *oh_name) | |||
815 | } | 815 | } |
816 | 816 | ||
817 | oh = omap_hwmod_lookup(oh_name); | 817 | oh = omap_hwmod_lookup(oh_name); |
818 | if (IS_ERR_OR_NULL(oh)) { | 818 | if (!oh) { |
819 | WARN(1, "%s: no hwmod for %s\n", __func__, | 819 | WARN(1, "%s: no hwmod for %s\n", __func__, |
820 | oh_name); | 820 | oh_name); |
821 | return ERR_PTR(oh ? PTR_ERR(oh) : -ENODEV); | 821 | return ERR_PTR(-ENODEV); |
822 | } | 822 | } |
823 | if (IS_ERR_OR_NULL(oh->od)) { | 823 | if (!oh->od) { |
824 | WARN(1, "%s: no omap_device for %s\n", __func__, | 824 | WARN(1, "%s: no omap_device for %s\n", __func__, |
825 | oh_name); | 825 | oh_name); |
826 | return ERR_PTR(oh->od ? PTR_ERR(oh->od) : -ENODEV); | 826 | return ERR_PTR(-ENODEV); |
827 | } | 827 | } |
828 | 828 | ||
829 | if (IS_ERR_OR_NULL(oh->od->pdev)) | ||
830 | return ERR_PTR(oh->od->pdev ? PTR_ERR(oh->od->pdev) : -ENODEV); | ||
831 | |||
832 | return &oh->od->pdev->dev; | 829 | return &oh->od->pdev->dev; |
833 | } | 830 | } |
834 | 831 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 9553c9907d40..93f213b6a784 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1663,7 +1663,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1663 | return -ENOSYS; | 1663 | return -ENOSYS; |
1664 | 1664 | ||
1665 | ret = _lookup_hardreset(oh, name, &ohri); | 1665 | ret = _lookup_hardreset(oh, name, &ohri); |
1666 | if (IS_ERR_VALUE(ret)) | 1666 | if (ret < 0) |
1667 | return ret; | 1667 | return ret; |
1668 | 1668 | ||
1669 | if (oh->clkdm) { | 1669 | if (oh->clkdm) { |
@@ -2413,7 +2413,7 @@ static int __init _init(struct omap_hwmod *oh, void *data) | |||
2413 | _init_mpu_rt_base(oh, NULL); | 2413 | _init_mpu_rt_base(oh, NULL); |
2414 | 2414 | ||
2415 | r = _init_clocks(oh, NULL); | 2415 | r = _init_clocks(oh, NULL); |
2416 | if (IS_ERR_VALUE(r)) { | 2416 | if (r < 0) { |
2417 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name); | 2417 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name); |
2418 | return -EINVAL; | 2418 | return -EINVAL; |
2419 | } | 2419 | } |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 1edd000a8143..0b339861d751 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -217,7 +217,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir) | |||
217 | return 0; | 217 | return 0; |
218 | 218 | ||
219 | d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir); | 219 | d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir); |
220 | if (!(IS_ERR_OR_NULL(d))) | 220 | if (d) |
221 | (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, | 221 | (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, |
222 | (void *)pwrdm, &pwrdm_suspend_fops); | 222 | (void *)pwrdm, &pwrdm_suspend_fops); |
223 | 223 | ||
@@ -261,8 +261,8 @@ static int __init pm_dbg_init(void) | |||
261 | return 0; | 261 | return 0; |
262 | 262 | ||
263 | d = debugfs_create_dir("pm_debug", NULL); | 263 | d = debugfs_create_dir("pm_debug", NULL); |
264 | if (IS_ERR_OR_NULL(d)) | 264 | if (!d) |
265 | return PTR_ERR(d); | 265 | return -EINVAL; |
266 | 266 | ||
267 | (void) debugfs_create_file("count", S_IRUGO, | 267 | (void) debugfs_create_file("count", S_IRUGO, |
268 | d, (void *)DEBUG_FILE_COUNTERS, &debug_fops); | 268 | d, (void *)DEBUG_FILE_COUNTERS, &debug_fops); |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 89cad4a605dd..86babd740d41 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -1180,7 +1180,7 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm) | |||
1180 | { | 1180 | { |
1181 | int i; | 1181 | int i; |
1182 | 1182 | ||
1183 | if (IS_ERR_OR_NULL(pwrdm)) { | 1183 | if (!pwrdm) { |
1184 | pr_debug("powerdomain: %s: invalid powerdomain pointer\n", | 1184 | pr_debug("powerdomain: %s: invalid powerdomain pointer\n", |
1185 | __func__); | 1185 | __func__); |
1186 | return 1; | 1186 | return 1; |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index ea6ea9aab092..63e6384fa72e 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -288,7 +288,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
288 | r = -EINVAL; | 288 | r = -EINVAL; |
289 | } else { | 289 | } else { |
290 | r = clk_set_parent(timer->fclk, src); | 290 | r = clk_set_parent(timer->fclk, src); |
291 | if (IS_ERR_VALUE(r)) | 291 | if (r < 0) |
292 | pr_warn("%s: %s cannot set source\n", | 292 | pr_warn("%s: %s cannot set source\n", |
293 | __func__, oh->name); | 293 | __func__, oh->name); |
294 | clk_put(src); | 294 | clk_put(src); |