Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp552963pxp; Wed, 9 Mar 2022 08:04:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJy27SdtioaSFGnBluvj3RfXdB/DEoOhhsR15w3W/osP8HaMyIHcsudTmNrfOlcS0jcUGKcD X-Received: by 2002:a25:8911:0:b0:61e:1c66:17b0 with SMTP id e17-20020a258911000000b0061e1c6617b0mr347805ybl.354.1646841885034; Wed, 09 Mar 2022 08:04:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646841885; cv=none; d=google.com; s=arc-20160816; b=GJaSudQp2cUfvWQ6G22q1ZsQnIL+m0wD+FLjM5qhA/pHJy7Ogij8ha6BFr2Uol4j91 wDrkrzOe7UWA3vH2tDY85NWKDF/tLY1HCLH+7TGGXIn6/lbVtoTOK9rWBBqE0Ihm/jQe FipbGT9AKuvG4kTzn5BEGYvLiW9GVUvQzRo8SHzQJ7ArBqL98qKepA4nupg8J/NZwna0 Y7E/hUaif52R62rxLAqaQERXsGYpt/e+FHscrg7VyaBbO5r3q7or1BUf+PJ2AUwkulKJ TypURTTonaT8qhO/liu38pIWy5e9DOp3Gqm+UBWq2PEUiL3YLGsCJODeYN7e4gVOK1+J k8lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=YWqA5ulPKbe8T7S8YkGuNlQRdXl19/GGCTCOPTokVZE=; b=BEaeIk91+IbIIyyDtdKq+FXfPntm4Za9hVFROIaw3ALxvMkE+Qi7ea9n5hW0UdUGpL eQIyZ9cFADFeHf7tt3eHeIz77xpVYN4ZlcGn+OvmsG9bjNQzfSanqU5+v+uC3QmwMWrp lO0Pkhmj8IuR3ZxyQtfyEwKFkagEVZjdtoSzykHgN3R3S95Zkjhxk9NVuG5Yxq+dbxGX 7qyPnSetyT/XwLvjwSyZIvVq1qjEmZLdqoj5AoHJOuZDkgicO2yjhPA5Ap7Zrpwb4esC d5OhaCIjtoeBljXkw0MY0ZoP1EXQgJIWdwAHpaoRDiWd0Gjq8iaPbfpujqgYx0O9dgv7 HutA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu13-20020a056902090d00b0062883dcbc68si1494534ybb.85.2022.03.09.08.04.27; Wed, 09 Mar 2022 08:04:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233312AbiCINvJ (ORCPT + 99 others); Wed, 9 Mar 2022 08:51:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232800AbiCINvG (ORCPT ); Wed, 9 Mar 2022 08:51:06 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E25FE15042A; Wed, 9 Mar 2022 05:50:07 -0800 (PST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 9EBDCC000A; Wed, 9 Mar 2022 13:50:03 +0000 (UTC) Date: Wed, 9 Mar 2022 14:50:01 +0100 From: Jacopo Mondi To: Laurentiu Palcu Cc: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Niklas =?utf-8?Q?S=C3=B6derlund?= , Mauro Carvalho Chehab , Rob Herring , Sakari Ailus , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] media: i2c: rdacm2x: properly set subdev entity function Message-ID: <20220309135001.gsffmzd7qezyib2c@uno.localdomain> References: <20220309115507.30019-1-laurentiu.palcu@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220309115507.30019-1-laurentiu.palcu@oss.nxp.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Laurentiu On Wed, Mar 09, 2022 at 01:55:06PM +0200, Laurentiu Palcu wrote: > The subdevice entity function was left unset, which produces a warning > when probing the device: > > mxc-md bus@58000000:camera: Entity type for entity rdacm20 19-0051 was > not initialized! > > This patch will set entity function to MEDIA_ENT_F_CAM_SENSOR and leave > flags unset. > > Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") > Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module") > Signed-off-by: Laurentiu Palcu Thanks! Reviewed-by: Jacopo Mondi > --- > Changes in v2: > * leave entity flags unset; > > Cheers, > Laurentiu > > drivers/media/i2c/rdacm20.c | 2 +- > drivers/media/i2c/rdacm21.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c > index 025a610de893..9c6f66cab564 100644 > --- a/drivers/media/i2c/rdacm20.c > +++ b/drivers/media/i2c/rdacm20.c > @@ -611,7 +611,7 @@ static int rdacm20_probe(struct i2c_client *client) > goto error_free_ctrls; > > dev->pad.flags = MEDIA_PAD_FL_SOURCE; > - dev->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; > + dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; > ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); > if (ret < 0) > goto error_free_ctrls; > diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c > index 12ec5467ed1e..ef31cf5f23ca 100644 > --- a/drivers/media/i2c/rdacm21.c > +++ b/drivers/media/i2c/rdacm21.c > @@ -583,7 +583,7 @@ static int rdacm21_probe(struct i2c_client *client) > goto error_free_ctrls; > > dev->pad.flags = MEDIA_PAD_FL_SOURCE; > - dev->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR; > + dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; > ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad); > if (ret < 0) > goto error_free_ctrls; > -- > 2.17.1 >