Message ID | 1438685469-12230-1-git-send-email-josh.wu@atmel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Guennadi Liakhovetski |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1ZMZjf-0005sY-A2; Tue, 04 Aug 2015 12:46:19 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-8) with esmtp id 1ZMZjc-0007Bu-ls; Tue, 04 Aug 2015 12:46:18 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933045AbbHDKp4 (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Tue, 4 Aug 2015 06:45:56 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:34556 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932150AbbHDKp4 (ORCPT <rfc822; linux-media@vger.kernel.org>); Tue, 4 Aug 2015 06:45:56 -0400 Received: from apsmtp01.atmel.com (10.168.254.31) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 4 Aug 2015 12:45:52 +0200 Received: from melon.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 4 Aug 2015 18:46:27 +0800 From: Josh Wu <josh.wu@atmel.com> To: Linux Media Mailing List <linux-media@vger.kernel.org>, "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>, Laurent Pinchart <laurent.pinchart@ideasonboard.com> CC: Josh Wu <josh.wu@atmel.com>, Mauro Carvalho Chehab <mchehab@osg.samsung.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH] media: soc-camera: increase the length of clk_name on soc_of_bind() Date: Tue, 4 Aug 2015 18:51:09 +0800 Message-ID: <1438685469-12230-1-git-send-email-josh.wu@atmel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.8.4.103916 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, NO_URI_HTTPS 0, SINGLE_URI_IN_BODY 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __DATE_TZ_HK 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_IN_BODY 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Josh Wu
Aug. 4, 2015, 10:51 a.m. UTC
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(-)
Comments
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 > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 >> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 */