diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-04-20 10:37:55 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-04-26 00:32:03 +0200 |
commit | 8f8edd491ac64c3cfe4e8ffff2b7385df5c02860 (patch) | |
tree | dd4d43aca20405a371f73183fed8bd15ad3cc696 /drivers/i2c | |
parent | 0915833bd5f9987fdcdb491da1e75026bae05683 (diff) | |
download | linux-8f8edd491ac64c3cfe4e8ffff2b7385df5c02860.tar.gz linux-8f8edd491ac64c3cfe4e8ffff2b7385df5c02860.tar.bz2 linux-8f8edd491ac64c3cfe4e8ffff2b7385df5c02860.zip |
i2c: s3c2410: Print errno code in error logs
The driver not always prints the error code in case of a failure but this
information can be very useful for debugging. So let's print if available.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index dde1abce07ee..c08830549578 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -926,7 +926,7 @@ static int s3c24xx_i2c_cpufreq_transition(struct notifier_block *nb, i2c_unlock_adapter(&i2c->adap); if (ret < 0) - dev_err(i2c->dev, "cannot find frequency\n"); + dev_err(i2c->dev, "cannot find frequency (%d)\n", ret); else dev_info(i2c->dev, "setting freq %d\n", got); } @@ -977,7 +977,8 @@ static int s3c24xx_i2c_parse_dt_gpio(struct s3c24xx_i2c *i2c) ret = gpio_request(gpio, "i2c-bus"); if (ret) { - dev_err(i2c->dev, "gpio [%d] request failed\n", gpio); + dev_err(i2c->dev, "gpio [%d] request failed (%d)\n", + gpio, ret); goto free_gpio; } } |