Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp620049pxb; Tue, 5 Apr 2022 16:11:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYberPA9gPBcRoNKdnsvZ3U2RnuOC/GFf1lLNnB9vdqfXoRbZX9jLNUKcqHdob1wGc5Dg7 X-Received: by 2002:a17:90a:488c:b0:1c7:b62e:8e8c with SMTP id b12-20020a17090a488c00b001c7b62e8e8cmr6656737pjh.157.1649200267112; Tue, 05 Apr 2022 16:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649200267; cv=none; d=google.com; s=arc-20160816; b=EqujcfM5Z7+94qdLD7zKLc8PO/6FBbwM0ZWREGMZxlo4+OLq3mhK2mBfhjt+vQhSBb aFt8AdG9BrKq1yKcc2/OHWncT1Z3WVRxykK+Tk2hF50olal+rIi9bIfqTnJwE/xvYAoW n8DklkeotprIPgc7MBw60CFpul7maT5CTQ9jJZrG2MDEcDcIYIuA+wu7LXRwFGBc+noP I9igdDguGwoNhC5dkurjgHLtLnMDxq0sq3xTPSCpZw+1SNHFVeHysPxi0MyxyUIE/rmf p1aomA/Atz4xMCPaw4QWx/UbsWNy2eiB4l8yERtZenRJWXGg7fUKEebpTIv/Gw5iIMFH LM4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k6RAzS1GTcW2W2Nv5nhT9b7f8adq0uHZyFcQkj4AZ60=; b=djS5QcgqlBRB8eZqPOOJihk+GIdUIJ4LsFS8NNvObTh9IG/y8n8YUbzazckA8x71kU v1Covwkim0YyZ0Gzappt4ymvSMUWnjP6obGjSHBKt36qME7UbphHWqEe6kFFkl7tbRTr v9+e7QylOzhd6eYP22Z61oLsUiX6IxNB5TDC+AyDpLUHpr6lQl1pl/dwObPSi6Y63la5 DkK1AN+V8CYAvnctBsGEC7wPOVC/JzuXtfaFaewvtYqA/NY7SV6yPoW5D1i9PMY91l94 4NUJXDifL81VYLVur7RXG/lXi1IJAhUON61tY0MGu38loaZDRyqAM97+uo6GTyeyGRfB sZCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KtRdRypg; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o3-20020a635d43000000b003816043f14dsi1270939pgm.834.2022.04.05.16.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:11:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KtRdRypg; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 37402574A0; Tue, 5 Apr 2022 15:54:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380981AbiDEPNx (ORCPT + 99 others); Tue, 5 Apr 2022 11:13:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346408AbiDEJo7 (ORCPT ); Tue, 5 Apr 2022 05:44:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 764AADA098; Tue, 5 Apr 2022 02:30:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1066A61680; Tue, 5 Apr 2022 09:30:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CA17C385A2; Tue, 5 Apr 2022 09:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151034; bh=qHfZR3XOEbdpOjmMWZoUuZZmMk1njjr2FLMPPXofQL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KtRdRypgfDTaGdCbOm8xerS4XUJY+To2ydVnhTWvvDvxPBF81yz0avqDjMgQ5qwsV 0iSc+Rix7PFxgjjEaszNmsXwZTBaRqq7km/x2lpJ/9CWCt155m+qoslPSemf2iMaN8 8esyVPcSttwzQHGvt/fPGxiag//FecxFghFueJ1E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Laurent Pinchart , Rui Miguel Silva , Sakari Ailus , Jerome Brunet , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.15 270/913] media: staging: media: imx: imx7-mipi-csis: Make subdev name unique Date: Tue, 5 Apr 2022 09:22:12 +0200 Message-Id: <20220405070347.951212421@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Laurent Pinchart [ Upstream commit 5be7f8c91d25089be847a71b336c13b5bb0db772 ] When multiple CSIS instances are present in a single graph, they are currently all named "imx7-mipi-csis.0", which breaks the entity name uniqueness requirement. Fix it by using the device name to create the subdev name. Fixes: 7807063b862b ("media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7") Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Sakari Ailus Reviewed-by: Jerome Brunet Tested-by: Jerome Brunet # On i.MX8MP Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 41e33535de55..d35e52374116 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -32,7 +32,6 @@ #include #define CSIS_DRIVER_NAME "imx7-mipi-csis" -#define CSIS_SUBDEV_NAME CSIS_DRIVER_NAME #define CSIS_PAD_SINK 0 #define CSIS_PAD_SOURCE 1 @@ -311,7 +310,6 @@ struct csi_state { struct reset_control *mrst; struct regulator *mipi_phy_regulator; const struct mipi_csis_info *info; - u8 index; struct v4l2_subdev sd; struct media_pad pads[CSIS_PADS_NUM]; @@ -1303,8 +1301,8 @@ static int mipi_csis_subdev_init(struct csi_state *state) v4l2_subdev_init(sd, &mipi_csis_subdev_ops); sd->owner = THIS_MODULE; - snprintf(sd->name, sizeof(sd->name), "%s.%d", - CSIS_SUBDEV_NAME, state->index); + snprintf(sd->name, sizeof(sd->name), "csis-%s", + dev_name(state->dev)); sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; sd->ctrl_handler = NULL; -- 2.34.1