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/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 c3558f93d42..6c949bc8625 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)  	/* Initialize the omap3 opp table if not already created. */  	r = omap3_opp_init(); -	if (IS_ERR_VALUE(r) && (r != -EEXIST)) { +	if (r < 0 && (r != -EEXIST)) {  		pr_err("%s: opp default init failed\n", __func__);  		return r;  	} diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index e4ec3a69ee2..2191f25ad21 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)  		return -ENOENT;  	r = clk_set_rate(mpurate_ck, mpurate); -	if (IS_ERR_VALUE(r)) { +	if (r < 0) {  		WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n",  		     mpurate_ck_name, mpurate, r);  		clk_put(mpurate_ck); diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index fadd87435cd..0d75889c0a6 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)  	t = omap2_onenand_calc_async_timings();  	ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t); -	if (IS_ERR_VALUE(ret)) +	if (ret < 0)  		return ret;  	omap2_onenand_set_async_mode(onenand_base); @@ -325,7 +325,7 @@ static int omap2_onenand_setup_sync(void __iomem *onenand_base, int *freq_ptr)  	t = omap2_onenand_calc_sync_timings(gpmc_onenand_data, freq);  	ret = gpmc_set_sync_mode(gpmc_onenand_data->cs, &t); -	if (IS_ERR_VALUE(ret)) +	if (ret < 0)  		return ret;  	set_onenand_cfg(onenand_base); diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 410e1bac781..6de31739b45 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)  		return -EINVAL;  	gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0); -	if (IS_ERR_VALUE(gpmc_irq_start)) { +	if (gpmc_irq_start < 0) {  		pr_err("irq_alloc_descs failed\n");  		return gpmc_irq_start;  	} @@ -801,7 +801,7 @@ static int gpmc_mem_init(void)  			continue;  		gpmc_cs_get_memconf(cs, &base, &size);  		rc = gpmc_cs_insert_mem(cs, base, size); -		if (IS_ERR_VALUE(rc)) { +		if (rc < 0) {  			while (--cs >= 0)  				if (gpmc_cs_mem_enabled(cs))  					gpmc_cs_delete_mem(cs); @@ -1370,14 +1370,14 @@ static int gpmc_probe(struct platform_device *pdev)  		 GPMC_REVISION_MINOR(l));  	rc = gpmc_mem_init(); -	if (IS_ERR_VALUE(rc)) { +	if (rc < 0) {  		clk_disable_unprepare(gpmc_l3_clk);  		clk_put(gpmc_l3_clk);  		dev_err(gpmc_dev, "failed to reserve memory\n");  		return rc;  	} -	if (IS_ERR_VALUE(gpmc_setup_irq())) +	if (gpmc_setup_irq() < 0)  		dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");  	/* 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 381be7ac0c1..eeea4fa28fb 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)  	int oh_cnt, i, ret = 0;  	oh_cnt = of_property_count_strings(node, "ti,hwmods"); -	if (!oh_cnt || IS_ERR_VALUE(oh_cnt)) { +	if (oh_cnt <= 0) {  		dev_dbg(&pdev->dev, "No 'hwmods' to build omap_device\n");  		return -ENODEV;  	} @@ -815,20 +815,17 @@ struct device *omap_device_get_by_hwmod_name(const char *oh_name)  	}  	oh = omap_hwmod_lookup(oh_name); -	if (IS_ERR_OR_NULL(oh)) { +	if (!oh) {  		WARN(1, "%s: no hwmod for %s\n", __func__,  			oh_name); -		return ERR_PTR(oh ? PTR_ERR(oh) : -ENODEV); +		return ERR_PTR(-ENODEV);  	} -	if (IS_ERR_OR_NULL(oh->od)) { +	if (!oh->od) {  		WARN(1, "%s: no omap_device for %s\n", __func__,  			oh_name); -		return ERR_PTR(oh->od ? PTR_ERR(oh->od) : -ENODEV); +		return ERR_PTR(-ENODEV);  	} -	if (IS_ERR_OR_NULL(oh->od->pdev)) -		return ERR_PTR(oh->od->pdev ? PTR_ERR(oh->od->pdev) : -ENODEV); -  	return &oh->od->pdev->dev;  } diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index a202a478510..ede9d495a9e 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)  		return -ENOSYS;  	ret = _lookup_hardreset(oh, name, &ohri); -	if (IS_ERR_VALUE(ret)) +	if (ret < 0)  		return ret;  	if (oh->clkdm) { @@ -2416,7 +2416,7 @@ static int __init _init(struct omap_hwmod *oh, void *data)  	_init_mpu_rt_base(oh, NULL);  	r = _init_clocks(oh, NULL); -	if (IS_ERR_VALUE(r)) { +	if (r < 0) {  		WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);  		return -EINVAL;  	} diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 1edd000a814..0b339861d75 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)  		return 0;  	d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir); -	if (!(IS_ERR_OR_NULL(d))) +	if (d)  		(void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d,  			(void *)pwrdm, &pwrdm_suspend_fops); @@ -261,8 +261,8 @@ static int __init pm_dbg_init(void)  		return 0;  	d = debugfs_create_dir("pm_debug", NULL); -	if (IS_ERR_OR_NULL(d)) -		return PTR_ERR(d); +	if (!d) +		return -EINVAL;  	(void) debugfs_create_file("count", S_IRUGO,  		d, (void *)DEBUG_FILE_COUNTERS, &debug_fops); diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 8e61d80bf6b..43ac20c15f4 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)  {  	int i; -	if (IS_ERR_OR_NULL(pwrdm)) { +	if (!pwrdm) {  		pr_debug("powerdomain: %s: invalid powerdomain pointer\n",  			 __func__);  		return 1; diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index f62b509ed08..a97026400af 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,  			r = -EINVAL;  		} else {  			r = clk_set_parent(timer->fclk, src); -			if (IS_ERR_VALUE(r)) +			if (r < 0)  				pr_warn("%s: %s cannot set source\n",  					__func__, oh->name);  			clk_put(src);  |