diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-02 23:38:13 -0800 | 
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-12-02 23:38:13 -0800 | 
| commit | 467832032cc07626880363efa8625719c16c04eb (patch) | |
| tree | ee9a62c04f0b3106e412bc1b2dd1cea5566d5ca7 /drivers/hwmon/s3c-hwmon.c | |
| parent | 66d2a5952eab875f1286e04f738ef029afdaf013 (diff) | |
| parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) | |
| download | olio-linux-3.10-467832032cc07626880363efa8625719c16c04eb.tar.xz olio-linux-3.10-467832032cc07626880363efa8625719c16c04eb.zip  | |
Merge commit 'v2.6.32' into next
Diffstat (limited to 'drivers/hwmon/s3c-hwmon.c')
| -rw-r--r-- | drivers/hwmon/s3c-hwmon.c | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index 3a524f2fe49..71835412529 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c @@ -323,14 +323,21 @@ static int __devinit s3c_hwmon_probe(struct platform_device *dev)  	}  	for (i = 0; i < ARRAY_SIZE(pdata->in); i++) { -		if (!pdata->in[i]) +		struct s3c24xx_adc_hwmon_incfg *cfg = pdata->in[i]; + +		if (!cfg)  			continue; -		if (pdata->in[i]->mult >= 0x10000) +		if (cfg->mult >= 0x10000)  			dev_warn(&dev->dev,  				 "channel %d multiplier too large\n",  				 i); +		if (cfg->divider == 0) { +			dev_err(&dev->dev, "channel %d divider zero\n", i); +			continue; +		} +  		ret = s3c_hwmon_create_attr(&dev->dev, pdata->in[i],  					    &hwmon->attrs[i], i);  		if (ret) {  |