diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-05-02 16:31:29 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-05-02 16:31:29 -0400 |
commit | 33b9f582c5c1db515412cc7efff28f7d1779321f (patch) | |
tree | 60ea1b403b41f651bc570f4c368ba82064880796 /arch/arm/mach-omap2 | |
parent | 946342d03ec4e8367bba7bb99e7155e97f69058a (diff) | |
parent | 008ca431822f39a023322b3598d8366faf46cfc1 (diff) |
Merge branch 'cleanup' into for-linus
Conflicts:
arch/arm/plat-omap/dmtimer.c
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/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 |
9 files changed, 20 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index c3558f93d42c..6c949bc86256 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 e4ec3a69ee2e..2191f25ad21b 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -596,7 +596,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name) | |||
596 | return -ENOENT; | 596 | return -ENOENT; |
597 | 597 | ||
598 | r = clk_set_rate(mpurate_ck, mpurate); | 598 | r = clk_set_rate(mpurate_ck, mpurate); |
599 | if (IS_ERR_VALUE(r)) { | 599 | if (r < 0) { |
600 | WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", | 600 | WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", |
601 | mpurate_ck_name, mpurate, r); | 601 | mpurate_ck_name, mpurate, r); |
602 | clk_put(mpurate_ck); | 602 | 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/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 a202a4785104..ede9d495a9e2 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1666,7 +1666,7 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1666 | return -ENOSYS; | 1666 | return -ENOSYS; |
1667 | 1667 | ||
1668 | ret = _lookup_hardreset(oh, name, &ohri); | 1668 | ret = _lookup_hardreset(oh, name, &ohri); |
1669 | if (IS_ERR_VALUE(ret)) | 1669 | if (ret < 0) |
1670 | return ret; | 1670 | return ret; |
1671 | 1671 | ||
1672 | if (oh->clkdm) { | 1672 | if (oh->clkdm) { |
@@ -2416,7 +2416,7 @@ static int __init _init(struct omap_hwmod *oh, void *data) | |||
2416 | _init_mpu_rt_base(oh, NULL); | 2416 | _init_mpu_rt_base(oh, NULL); |
2417 | 2417 | ||
2418 | r = _init_clocks(oh, NULL); | 2418 | r = _init_clocks(oh, NULL); |
2419 | if (IS_ERR_VALUE(r)) { | 2419 | if (r < 0) { |
2420 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name); | 2420 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name); |
2421 | return -EINVAL; | 2421 | return -EINVAL; |
2422 | } | 2422 | } |
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 8e61d80bf6b3..43ac20c15f4f 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -1182,7 +1182,7 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm) | |||
1182 | { | 1182 | { |
1183 | int i; | 1183 | int i; |
1184 | 1184 | ||
1185 | if (IS_ERR_OR_NULL(pwrdm)) { | 1185 | if (!pwrdm) { |
1186 | pr_debug("powerdomain: %s: invalid powerdomain pointer\n", | 1186 | pr_debug("powerdomain: %s: invalid powerdomain pointer\n", |
1187 | __func__); | 1187 | __func__); |
1188 | return 1; | 1188 | return 1; |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index f62b509ed08d..a97026400af7 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -287,7 +287,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
287 | r = -EINVAL; | 287 | r = -EINVAL; |
288 | } else { | 288 | } else { |
289 | r = clk_set_parent(timer->fclk, src); | 289 | r = clk_set_parent(timer->fclk, src); |
290 | if (IS_ERR_VALUE(r)) | 290 | if (r < 0) |
291 | pr_warn("%s: %s cannot set source\n", | 291 | pr_warn("%s: %s cannot set source\n", |
292 | __func__, oh->name); | 292 | __func__, oh->name); |
293 | clk_put(src); | 293 | clk_put(src); |