diff mbox

[3/3] i2c: OMAP fix driver initialization message

Message ID 1348070841-23354-4-git-send-email-panto@antoniou-consulting.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pantelis Antoniou Sept. 19, 2012, 4:07 p.m. UTC
The message spit out when the i2c-omap driver load is printing
the platform device's id as a bus number. However when booting
from OF id is -1, which is not so nice.

Fix it by printing the adapter number.

[    0.210467] omap_i2c 44e0b000.i2c: bus -1 rev2.4.0 at 400 kHz
	vs
[    0.210467] omap_i2c 44e0b000.i2c: bus 0 rev2.4.0 at 400 kHz

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/i2c/busses/i2c-omap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tony Lindgren Sept. 18, 2012, 6:24 p.m. UTC | #1
* Pantelis Antoniou <panto@antoniou-consulting.com> [120918 11:13]:
> The message spit out when the i2c-omap driver load is printing
> the platform device's id as a bus number. However when booting
> from OF id is -1, which is not so nice.
> 
> Fix it by printing the adapter number.
> 
> [    0.210467] omap_i2c 44e0b000.i2c: bus -1 rev2.4.0 at 400 kHz
> 	vs
> [    0.210467] omap_i2c 44e0b000.i2c: bus 0 rev2.4.0 at 400 kHz
> 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>

Acked-by: Tony Lindgren <tony@atomide.com>
--
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
Benoit Cousson Sept. 18, 2012, 7:24 p.m. UTC | #2
Hi Panto,

That patch is good, but a similar one was already posted by Florian.
https://patchwork.kernel.org/patch/1392671/

Checking the email thread it seems that Wolfram	pulled it.

Regards,
Benoit

On 9/19/2012 11:07 AM, Pantelis Antoniou wrote:
> The message spit out when the i2c-omap driver load is printing
> the platform device's id as a bus number. However when booting
> from OF id is -1, which is not so nice.
>
> Fix it by printing the adapter number.
>
> [    0.210467] omap_i2c 44e0b000.i2c: bus -1 rev2.4.0 at 400 kHz
> 	vs
> [    0.210467] omap_i2c 44e0b000.i2c: bus 0 rev2.4.0 at 400 kHz
>
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
>   drivers/i2c/busses/i2c-omap.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index f722478..87bb705 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1178,9 +1178,6 @@ omap_i2c_probe(struct platform_device *pdev)
>   		goto err_unuse_clocks;
>   	}
>
> -	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
> -		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
> -
>   	adap = &dev->adapter;
>   	i2c_set_adapdata(adap, dev);
>   	adap->owner = THIS_MODULE;
> @@ -1204,6 +1201,9 @@ omap_i2c_probe(struct platform_device *pdev)
>   	if (IS_ERR(pinctrl))
>   		dev_warn(dev->dev, "pins are not configured from the driver\n");
>
> +	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
> +		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
> +
>   	pm_runtime_mark_last_busy(dev->dev);
>   	pm_runtime_put_autosuspend(dev->dev);
>
>

--
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
Pantelis Antoniou Sept. 19, 2012, 9:57 a.m. UTC | #3
Hi Benoit,

On Sep 18, 2012, at 10:24 PM, a0919096 wrote:

> Hi Panto,
> 
> That patch is good, but a similar one was already posted by Florian.
> https://patchwork.kernel.org/patch/1392671/
> 
> Checking the email thread it seems that Wolfram	pulled it.
> 
> Regards,
> Benoit
> 

Great. One less thing to look after :)

Regards

-- Pantelis

> On 9/19/2012 11:07 AM, Pantelis Antoniou wrote:
>> The message spit out when the i2c-omap driver load is printing
>> the platform device's id as a bus number. However when booting
>> from OF id is -1, which is not so nice.
>> 
>> Fix it by printing the adapter number.
>> 
>> [    0.210467] omap_i2c 44e0b000.i2c: bus -1 rev2.4.0 at 400 kHz
>> 	vs
>> [    0.210467] omap_i2c 44e0b000.i2c: bus 0 rev2.4.0 at 400 kHz
>> 
>> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
>> ---
>>  drivers/i2c/busses/i2c-omap.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
>> index f722478..87bb705 100644
>> --- a/drivers/i2c/busses/i2c-omap.c
>> +++ b/drivers/i2c/busses/i2c-omap.c
>> @@ -1178,9 +1178,6 @@ omap_i2c_probe(struct platform_device *pdev)
>>  		goto err_unuse_clocks;
>>  	}
>> 
>> -	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
>> -		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
>> -
>>  	adap = &dev->adapter;
>>  	i2c_set_adapdata(adap, dev);
>>  	adap->owner = THIS_MODULE;
>> @@ -1204,6 +1201,9 @@ omap_i2c_probe(struct platform_device *pdev)
>>  	if (IS_ERR(pinctrl))
>>  		dev_warn(dev->dev, "pins are not configured from the driver\n");
>> 
>> +	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
>> +		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
>> +
>>  	pm_runtime_mark_last_busy(dev->dev);
>>  	pm_runtime_put_autosuspend(dev->dev);
>> 
>> 
> 

--
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
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index f722478..87bb705 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1178,9 +1178,6 @@  omap_i2c_probe(struct platform_device *pdev)
 		goto err_unuse_clocks;
 	}
 
-	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id,
-		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
-
 	adap = &dev->adapter;
 	i2c_set_adapdata(adap, dev);
 	adap->owner = THIS_MODULE;
@@ -1204,6 +1201,9 @@  omap_i2c_probe(struct platform_device *pdev)
 	if (IS_ERR(pinctrl))
 		dev_warn(dev->dev, "pins are not configured from the driver\n");
 
+	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
+		 dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed);
+
 	pm_runtime_mark_last_busy(dev->dev);
 	pm_runtime_put_autosuspend(dev->dev);