* [PATCH] I2C: i2c subsystem should print error messages
@ 2008-04-17 12:29 Felipe Balbi
2008-04-21 18:47 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Felipe Balbi @ 2008-04-17 12:29 UTC (permalink / raw)
To: linux-omap; +Cc: Felipe Balbi
We don't have to print any error message if i2c_add_driver
fails since i2c subsystem already does it.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
drivers/i2c/chips/isp1301_omap.c | 10 +---------
drivers/i2c/chips/menelaus.c | 10 +---------
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
index 6ebff9c..09f9662 100644
--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -1606,15 +1606,7 @@ static struct i2c_driver isp1301_driver = {
static int __init isp_init(void)
{
- int status = -ENODEV;
-
- printk(KERN_INFO "%s: version %s\n", DRIVER_NAME, DRIVER_VERSION);
-
- status = i2c_add_driver(&isp1301_driver);
- if (status)
- printk(KERN_ERR "%s failed to probe\n", DRIVER_NAME);
-
- return status;
+ return i2c_add_driver(&isp1301_driver);
}
module_init(isp_init);
diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
index 1d7482a..d4d1ccc 100644
--- a/drivers/i2c/chips/menelaus.c
+++ b/drivers/i2c/chips/menelaus.c
@@ -1281,15 +1281,7 @@ static struct i2c_driver menelaus_i2c_driver = {
static int __init menelaus_init(void)
{
- int res;
-
- res = i2c_add_driver(&menelaus_i2c_driver);
- if (res < 0) {
- dev_err(&the_menelaus->client->dev, "driver registration failed\n");
- return res;
- }
-
- return 0;
+ return i2c_add_driver(&menelaus_i2c_driver);
}
static void __exit menelaus_exit(void)
--
1.5.5.49.gf43e2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] I2C: i2c subsystem should print error messages
2008-04-17 12:29 [PATCH] I2C: i2c subsystem should print error messages Felipe Balbi
@ 2008-04-21 18:47 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2008-04-21 18:47 UTC (permalink / raw)
To: Felipe Balbi; +Cc: linux-omap
* Felipe Balbi <felipe.balbi@nokia.com> [080417 05:31]:
> We don't have to print any error message if i2c_add_driver
> fails since i2c subsystem already does it.
Pushing.
Tony
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
> drivers/i2c/chips/isp1301_omap.c | 10 +---------
> drivers/i2c/chips/menelaus.c | 10 +---------
> 2 files changed, 2 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
> index 6ebff9c..09f9662 100644
> --- a/drivers/i2c/chips/isp1301_omap.c
> +++ b/drivers/i2c/chips/isp1301_omap.c
> @@ -1606,15 +1606,7 @@ static struct i2c_driver isp1301_driver = {
>
> static int __init isp_init(void)
> {
> - int status = -ENODEV;
> -
> - printk(KERN_INFO "%s: version %s\n", DRIVER_NAME, DRIVER_VERSION);
> -
> - status = i2c_add_driver(&isp1301_driver);
> - if (status)
> - printk(KERN_ERR "%s failed to probe\n", DRIVER_NAME);
> -
> - return status;
> + return i2c_add_driver(&isp1301_driver);
> }
> module_init(isp_init);
>
> diff --git a/drivers/i2c/chips/menelaus.c b/drivers/i2c/chips/menelaus.c
> index 1d7482a..d4d1ccc 100644
> --- a/drivers/i2c/chips/menelaus.c
> +++ b/drivers/i2c/chips/menelaus.c
> @@ -1281,15 +1281,7 @@ static struct i2c_driver menelaus_i2c_driver = {
>
> static int __init menelaus_init(void)
> {
> - int res;
> -
> - res = i2c_add_driver(&menelaus_i2c_driver);
> - if (res < 0) {
> - dev_err(&the_menelaus->client->dev, "driver registration failed\n");
> - return res;
> - }
> -
> - return 0;
> + return i2c_add_driver(&menelaus_i2c_driver);
> }
>
> static void __exit menelaus_exit(void)
> --
> 1.5.5.49.gf43e2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-21 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-17 12:29 [PATCH] I2C: i2c subsystem should print error messages Felipe Balbi
2008-04-21 18:47 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox