linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: soc-camera: increase the length of clk_name on soc_of_bind()
@ 2015-08-04 10:51 Josh Wu
  2015-08-30 14:06 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Wu @ 2015-08-04 10:51 UTC (permalink / raw)
  To: Linux Media Mailing List, Guennadi Liakhovetski, Laurent Pinchart
  Cc: Josh Wu, Mauro Carvalho Chehab, linux-kernel

Since in soc_of_bind() it may use the of node's full name as the clk_name,
and this full name may be longer than 32 characters, take at91 i2c sensor
as an example, length is 34 bytes:
   /ahb/apb/i2c@f8028000/camera@0x30

So this patch increase the clk_name[] array size to 64. It seems big
enough so far.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
---

 drivers/media/platform/soc_camera/soc_camera.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
index d708df4..fcf3e97 100644
--- a/drivers/media/platform/soc_camera/soc_camera.c
+++ b/drivers/media/platform/soc_camera/soc_camera.c
@@ -1621,7 +1621,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
 	struct soc_camera_async_client *sasc;
 	struct soc_of_info *info;
 	struct i2c_client *client;
-	char clk_name[V4L2_SUBDEV_NAME_SIZE];
+	char clk_name[V4L2_SUBDEV_NAME_SIZE + 32];
 	int ret;
 
 	/* allocate a new subdev and add match info to it */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: soc-camera: increase the length of clk_name on soc_of_bind()
  2015-08-04 10:51 [PATCH] media: soc-camera: increase the length of clk_name on soc_of_bind() Josh Wu
@ 2015-08-30 14:06 ` Guennadi Liakhovetski
  2015-09-18 10:59   ` Josh Wu
  0 siblings, 1 reply; 3+ messages in thread
From: Guennadi Liakhovetski @ 2015-08-30 14:06 UTC (permalink / raw)
  To: Josh Wu
  Cc: Linux Media Mailing List, Laurent Pinchart,
	Mauro Carvalho Chehab, linux-kernel

Hi Josh,

Sorry, I missed the 4.3 merge cycle, but isn't this patch a fix? Isn't it 
fixing soc-camera / atmel-isi on a specific platform, where the clock name 
is longer, than currently supported? Is this platform in the mainline and 
its current camera support is broken because of this? In such a case we 
could still push it in for 4.3

Thanks
Guennadi

On Tue, 4 Aug 2015, Josh Wu wrote:

> Since in soc_of_bind() it may use the of node's full name as the clk_name,
> and this full name may be longer than 32 characters, take at91 i2c sensor
> as an example, length is 34 bytes:
>    /ahb/apb/i2c@f8028000/camera@0x30
> 
> So this patch increase the clk_name[] array size to 64. It seems big
> enough so far.
> 
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
> 
>  drivers/media/platform/soc_camera/soc_camera.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
> index d708df4..fcf3e97 100644
> --- a/drivers/media/platform/soc_camera/soc_camera.c
> +++ b/drivers/media/platform/soc_camera/soc_camera.c
> @@ -1621,7 +1621,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>  	struct soc_camera_async_client *sasc;
>  	struct soc_of_info *info;
>  	struct i2c_client *client;
> -	char clk_name[V4L2_SUBDEV_NAME_SIZE];
> +	char clk_name[V4L2_SUBDEV_NAME_SIZE + 32];
>  	int ret;
>  
>  	/* allocate a new subdev and add match info to it */
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: soc-camera: increase the length of clk_name on soc_of_bind()
  2015-08-30 14:06 ` Guennadi Liakhovetski
@ 2015-09-18 10:59   ` Josh Wu
  0 siblings, 0 replies; 3+ messages in thread
From: Josh Wu @ 2015-09-18 10:59 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Linux Media Mailing List, Laurent Pinchart,
	Mauro Carvalho Chehab, linux-kernel

Hi, Guennadi

On 8/30/2015 10:06 PM, Guennadi Liakhovetski wrote:
> Hi Josh,
>
> Sorry, I missed the 4.3 merge cycle, but isn't this patch a fix? Isn't it
> fixing soc-camera / atmel-isi on a specific platform, where the clock name
> is longer, than currently supported? Is this platform in the mainline and
> its current camera support is broken because of this?

I missed your email, so sorry for the late reply.

yes, it will break the detect flow if the i2c camera is loaded as module.

>   In such a case we
> could still push it in for 4.3

So it is a fix, it is great if this one can still go into 4.3.

Best Regards,
Josh Wu
>
> Thanks
> Guennadi
>
> On Tue, 4 Aug 2015, Josh Wu wrote:
>
>> Since in soc_of_bind() it may use the of node's full name as the clk_name,
>> and this full name may be longer than 32 characters, take at91 i2c sensor
>> as an example, length is 34 bytes:
>>     /ahb/apb/i2c@f8028000/camera@0x30
>>
>> So this patch increase the clk_name[] array size to 64. It seems big
>> enough so far.
>>
>> Signed-off-by: Josh Wu <josh.wu@atmel.com>
>> ---
>>
>>   drivers/media/platform/soc_camera/soc_camera.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c
>> index d708df4..fcf3e97 100644
>> --- a/drivers/media/platform/soc_camera/soc_camera.c
>> +++ b/drivers/media/platform/soc_camera/soc_camera.c
>> @@ -1621,7 +1621,7 @@ static int soc_of_bind(struct soc_camera_host *ici,
>>   	struct soc_camera_async_client *sasc;
>>   	struct soc_of_info *info;
>>   	struct i2c_client *client;
>> -	char clk_name[V4L2_SUBDEV_NAME_SIZE];
>> +	char clk_name[V4L2_SUBDEV_NAME_SIZE + 32];
>>   	int ret;
>>   
>>   	/* allocate a new subdev and add match info to it */
>> -- 
>> 1.9.1
>>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-18 10:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 10:51 [PATCH] media: soc-camera: increase the length of clk_name on soc_of_bind() Josh Wu
2015-08-30 14:06 ` Guennadi Liakhovetski
2015-09-18 10:59   ` Josh Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).