From patchwork Wed Nov 29 14:15:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 748886 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IhNXMlqQ" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D1D3AF for ; Wed, 29 Nov 2023 06:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701267429; x=1732803429; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f+hzlAvZP15+xkly/jgHoiRc47unqpM2G5Hg0gUNNYw=; b=IhNXMlqQrNYc/3lIOeEYa7JpO2a10bJJOc92KiM7mAIsXcge8TqhTTyd Qmzfumjy5xt02ZqIS8GPR5Ky3DkF5fz/9ajZWngt8DJ2XuMqOJWXE8vFG w/FYLForPlX2mPIYRT8HDj7d7lS4uchPCUBbiLe/H9/tW5AXASoEo4xgI XrzOERTWGWFbs98Z+Bh126Xw4IaZwSsaoSyDAzUqMUKOgkTZQvoWAZtEU nX8ktL26pO6WQU8A+QIp17AevWF3rsecZqg8H5wvw5ii/Mr7qAO8q/QxI L4e2rzZunkHqEqLMthdvBt6XQQBVD/7qknXbW4tbNc6yAJ4XnSP8Dis8y A==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="153861" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="153861" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:15:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="912868300" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="912868300" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:15:50 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 1722312019F; Wed, 29 Nov 2023 16:15:47 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Shuah Khan , Kieran Bingham , Hans Verkuil Subject: [PATCH 1/2] media: vivid: Don't explicitly set bus_info Date: Wed, 29 Nov 2023 16:15:44 +0200 Message-Id: <20231129141545.87461-2-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231129141545.87461-1-sakari.ailus@linux.intel.com> References: <20231129141545.87461-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The bus_info field in both struct media_device and struct v4l2_capability is assigned by the framework for platform devices. Do not set it in the driver. Signed-off-by: Sakari Ailus --- drivers/media/test-drivers/vivid/vivid-core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c index 353f035fcd19..fdd070876a6d 100644 --- a/drivers/media/test-drivers/vivid/vivid-core.c +++ b/drivers/media/test-drivers/vivid/vivid-core.c @@ -239,8 +239,6 @@ static int vidioc_querycap(struct file *file, void *priv, strscpy(cap->driver, "vivid", sizeof(cap->driver)); strscpy(cap->card, "vivid", sizeof(cap->card)); - snprintf(cap->bus_info, sizeof(cap->bus_info), - "platform:%s-%03d", VIVID_MODULE_NAME, dev->inst); cap->capabilities = dev->vid_cap_caps | dev->vid_out_caps | dev->vbi_cap_caps | dev->vbi_out_caps | @@ -1762,8 +1760,6 @@ static int vivid_create_instance(struct platform_device *pdev, int inst) /* Initialize media device */ strscpy(dev->mdev.model, VIVID_MODULE_NAME, sizeof(dev->mdev.model)); - snprintf(dev->mdev.bus_info, sizeof(dev->mdev.bus_info), - "platform:%s-%03d", VIVID_MODULE_NAME, inst); dev->mdev.dev = &pdev->dev; media_device_init(&dev->mdev); dev->mdev.ops = &vivid_media_ops; From patchwork Wed Nov 29 14:15:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 748381 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YjISo2Wy" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCB58B9 for ; Wed, 29 Nov 2023 06:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701267429; x=1732803429; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OvxHvUJPgZ+ALjVFjaBg94gLjkeSFSbPJFHcWbKUQr0=; b=YjISo2WysJM0oaUOHJvRGIwLGRps5ogGG4CJOFsF6WTKsaDCuOaYNJQe fCq+cVdw5waPyxiJSd8U9uv6CNQXau8V458SdK6914FtBl9/r6jif+SVT Tm+DB4Wok6HkxbG9mOksyICr8gKVugGhaE8UToBy5wLDHPi+grNr9by87 7OA+TGrn0IIqhfsJcfHmGrdJ9W7QtD04tn8b7p0Wzvz7TMySjBd236UxO /6MYirJsdjgj7J+tVD2MkEWJviEKe2LUAL7ZBQZZJiLbBqraqrrfsReOx oc9p/ngVrx6qRBU0pg2la0RW1+rIvUjRT7RgwBVY5DeS27XJ6itUAP33v Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="153864" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="153864" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:15:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="912868324" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="912868324" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 06:15:50 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id E0767120945; Wed, 29 Nov 2023 16:15:47 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Shuah Khan , Kieran Bingham , Hans Verkuil Subject: [PATCH 2/2] media: vimc: Don't explicitly set bus_info Date: Wed, 29 Nov 2023 16:15:45 +0200 Message-Id: <20231129141545.87461-3-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231129141545.87461-1-sakari.ailus@linux.intel.com> References: <20231129141545.87461-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The platform device name is already set by V4L2 and MC frameworks for media device bus_info and V4L2 querycap bus_info fields. Don't do it in the driver. Signed-off-by: Sakari Ailus Acked-by: Shuah Khan --- drivers/media/test-drivers/vimc/vimc-capture.c | 2 -- drivers/media/test-drivers/vimc/vimc-core.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c index aa944270e716..1e7cc7c980f9 100644 --- a/drivers/media/test-drivers/vimc/vimc-capture.c +++ b/drivers/media/test-drivers/vimc/vimc-capture.c @@ -57,8 +57,6 @@ static int vimc_capture_querycap(struct file *file, void *priv, { strscpy(cap->driver, VIMC_PDEV_NAME, sizeof(cap->driver)); strscpy(cap->card, KBUILD_MODNAME, sizeof(cap->card)); - snprintf(cap->bus_info, sizeof(cap->bus_info), - "platform:%s", VIMC_PDEV_NAME); return 0; } diff --git a/drivers/media/test-drivers/vimc/vimc-core.c b/drivers/media/test-drivers/vimc/vimc-core.c index af127476e920..2a924abd0ebc 100644 --- a/drivers/media/test-drivers/vimc/vimc-core.c +++ b/drivers/media/test-drivers/vimc/vimc-core.c @@ -366,8 +366,6 @@ static int vimc_probe(struct platform_device *pdev) /* Initialize media device */ strscpy(vimc->mdev.model, VIMC_MDEV_MODEL_NAME, sizeof(vimc->mdev.model)); - snprintf(vimc->mdev.bus_info, sizeof(vimc->mdev.bus_info), - "platform:%s", VIMC_PDEV_NAME); vimc->mdev.dev = &pdev->dev; media_device_init(&vimc->mdev);