From patchwork Wed Jan 6 03:04:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 357818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BCABC43331 for ; Wed, 6 Jan 2021 03:05:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 047E622D71 for ; Wed, 6 Jan 2021 03:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726418AbhAFDFZ (ORCPT ); Tue, 5 Jan 2021 22:05:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbhAFDFZ (ORCPT ); Tue, 5 Jan 2021 22:05:25 -0500 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC12BC06134D; Tue, 5 Jan 2021 19:04:59 -0800 (PST) Received: by mail-qt1-x831.google.com with SMTP id 7so1317668qtp.1; Tue, 05 Jan 2021 19:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nietjLUQJU/zJ/brz+Xm6cxAQwETU/f3MDRbRdqivaY=; b=FgZe9rJ0EbdtbrW6IfSOoZjsTSRBbFO17agIWlrEioMAK8j9pqrasM6XTg5KTYwDun rZetIXS91Zd2WszjxWNrfi2aAL2AvdZDTjpXBPfCEnS/Z4lywjFCp/rCkcHDJJPHs3/0 kzU7/4G40xhcX85gNb169iKbeDBxIcir6+QonIe9TU0yHkAicZUcPwkFJCokQ4Fz9gpJ f5nBrvxvjeEBotjBwdaukw/YFU75D56ajb77Ai7gVWxgGOz5G3b68nYiX7T+16Sm8xar XlVCaCcXFpYm77afvq4QaIMrh+q5INKGRosnsnU6o9+gWY6ePx2tb0yraVNoVBqfqnfg NTmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nietjLUQJU/zJ/brz+Xm6cxAQwETU/f3MDRbRdqivaY=; b=KMvLBF90Nj45FQPTIiBLWKVF3n7Seet01U6BCnYsj3FEjvFTFpswUGzCi8TGlsA1wZ 9X+d1XlwODF6TI4CpY3UkbPElM1bj+hMjOfr3/uiH2yFGtPMwu73oHNwpF69LpMLhaUC LcOaFAITdQbm9rAQY7SFqTC6m06R7lMVR3fRu+7cWDNEuunh5l1VSMORYrD6hYQO0ZVJ vc9QD3rB4SYoF0H7oXKmWHamAQvcINRKCT9RZdbW18pAzCS9S3fec5WbE7WoKbcGqQxe Gh++R6N6OiAgk37B26VM0dZu6jA5JKodrdcrvNeK0wIEnmoYt1aELFGu3RR3ETDWEnOE Vspw== X-Gm-Message-State: AOAM530iLF5MoFVYjlYTQL+vGFTYNTrrwjDYLx6RZmEqkN+p/xNMvem9 FUMukzsxapdj7mWUjhq566I= X-Google-Smtp-Source: ABdhPJwgB/I/Do35yimDpUpsv9P5HlI9YjYF1LUBSCekxSR7anI6XhdM6KiKkEAEYOBaDzuIXrIV8g== X-Received: by 2002:a05:622a:303:: with SMTP id q3mr2464654qtw.24.1609902299187; Tue, 05 Jan 2021 19:04:59 -0800 (PST) Received: from localhost.localdomain ([2804:14d:72b1:8920:77d4:6fb0:85b3:b6f7]) by smtp.gmail.com with ESMTPSA id n195sm730019qke.20.2021.01.05.19.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 19:04:58 -0800 (PST) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: mchehab@kernel.org, hverkuil@xs4all.nl Cc: "Daniel W. S. Almeida" , linux-media@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] media: vidtv: Add media controller support Date: Wed, 6 Jan 2021 00:04:46 -0300 Message-Id: <20210106030449.3223172-2-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210106030449.3223172-1-dwlsalmeida@gmail.com> References: <20210106030449.3223172-1-dwlsalmeida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Add media controller support when CONFIG_MEDIA_CONTROLLER_DVB is set so that, in the future, a test sequence in v4l-utils can be written without having to know which /dev/fooX device should be used. Signed-off-by: Daniel W. S. Almeida --- .../media/test-drivers/vidtv/vidtv_bridge.c | 28 +++++++++++++++++++ .../media/test-drivers/vidtv/vidtv_bridge.h | 6 ++++ 2 files changed, 34 insertions(+) diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index fc64d0c8492a..a2fa9b58174d 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include "vidtv_bridge.h" #include "vidtv_common.h" @@ -501,9 +503,30 @@ static int vidtv_bridge_probe(struct platform_device *pdev) platform_set_drvdata(pdev, dvb); +#ifdef CONFIG_MEDIA_CONTROLLER_DVB + dvb->mdev.dev = &pdev->dev; + + strscpy(dvb->mdev.model, "vidtv", sizeof(dvb->mdev.model)); + strscpy(dvb->mdev.bus_info, "platform:vidtv", sizeof(dvb->mdev.bus_info)); + + media_device_init(&dvb->mdev); + ret = media_device_register(&dvb->mdev); + if (ret) { + dev_err(dvb->mdev.dev, + "media device register failed (err=%d)\n", ret); + goto err_media_device_register; + } + + dvb_register_media_controller(&dvb->adapter, &dvb->mdev); +#endif //CONFIG_MEDIA_CONTROLLER_DVB + dev_info(&pdev->dev, "Successfully initialized vidtv!\n"); return ret; +#ifdef CONFIG_MEDIA_CONTROLLER_DVB +err_media_device_register: + media_device_cleanup(&dvb->mdev); +#endif //CONFIG_MEDIA_CONTROLLER_DVB err_dvb: kfree(dvb); return ret; @@ -516,6 +539,11 @@ static int vidtv_bridge_remove(struct platform_device *pdev) dvb = platform_get_drvdata(pdev); +#ifdef CONFIG_MEDIA_CONTROLLER_DVB + media_device_unregister(&dvb->mdev); + media_device_cleanup(&dvb->mdev); +#endif //CONFIG_MEDIA_CONTROLLER_DVB + mutex_destroy(&dvb->feed_lock); for (i = 0; i < NUM_FE; ++i) { diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.h b/drivers/media/test-drivers/vidtv/vidtv_bridge.h index 2528adaee27d..d42899a31295 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.h +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "vidtv_mux.h" @@ -42,6 +43,7 @@ * @feed_lock: Protects access to the start/stop stream logic/data. * @streaming: Whether we are streaming now. * @mux: The abstraction responsible for delivering MPEG TS packets to the bridge. + * @mdev: The media_device struct for media controller support. */ struct vidtv_dvb { struct platform_device *pdev; @@ -60,6 +62,10 @@ struct vidtv_dvb { bool streaming; struct vidtv_mux *mux; + +#ifdef CONFIG_MEDIA_CONTROLLER_DVB + struct media_device mdev; +#endif //CONFIG_MEDIA_CONTROLLER_DVB }; #endif // VIDTV_BRIDG_H From patchwork Wed Jan 6 03:04:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 357819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03D3FC4332D for ; Wed, 6 Jan 2021 03:05:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E14EA22D6F for ; Wed, 6 Jan 2021 03:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726536AbhAFDF2 (ORCPT ); Tue, 5 Jan 2021 22:05:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbhAFDF1 (ORCPT ); Tue, 5 Jan 2021 22:05:27 -0500 Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0702C061357; Tue, 5 Jan 2021 19:05:02 -0800 (PST) Received: by mail-qk1-x72d.google.com with SMTP id z11so1438597qkj.7; Tue, 05 Jan 2021 19:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bAQRTpcE0bBbk84O+D0aHdAZGl9TgRNlPD0z6hqS3fA=; b=rRQCiBkacLhYaAcIUequ8V5qg0BGgkN3XK2heHfDYK/Iyp0HrfQX6KMtzU+hlIVn9l l7Cvtj+yxUQBcpEh7vzJgyUAT4IEmFBbKvzoq00LLUx9hUmRjDqnQN3IAHuh2Bsz8BY7 0XWJTCoeOFdQDjd3UhTf+yadTrcWNodGDgtXMcldJiQJtlN4YmsYSqRJLzIOEg7sLkPO HdALWME8ol6IQuF6i5ZPYWAfFscPSpCafJfaYwQhB0ExGG9O5QXsGF8HbWiFsfdGRCaS E1rek/BxvZoJTAYcXjb34kdoiZOwv0QGqlShemGRS6AW9H2KYTFgaU9e5vEJ7i2rSrAo 6PPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bAQRTpcE0bBbk84O+D0aHdAZGl9TgRNlPD0z6hqS3fA=; b=UnIdtlQPVfDZ8hJUQJKVLYyyI1QZ/fjd5HJ0fCBo/16Y9CUcfrsbIiVpoEDx01fLVC zmWAnDSdamSLgehup5zI8naJ3k4TgRItI4tjn5lnPneJPUKnzUegtDEUo3KoOwPDwJWp kccHV2PJqzKhvTpnR1tJJ1BwuvRofQ2b4x0nPW/SI7K+ylvY0qut5hbcsu2rkFgausV0 bUEg5F7v5RWkLHbcD/JY+nnAGQ53jqn7SbvptLEiY8MJQr9m5iziYvw1iMY+VnPhaU5p lPQO+vL6lC9woKaN6iBluyt8hQgrn+hxpc1iY66oQQtprpkfA3HSCzNpDFggKrXSOwkd hiwQ== X-Gm-Message-State: AOAM533tCepGcUWECEzSUpMaRqPeyOeUtOOv0YmiIh1oCmw89RjYe1Xb GO0aVGyicJOfm7CX1GNpnTM= X-Google-Smtp-Source: ABdhPJwaE8CpXtIGHeZXNN4dGm3LTqFO8v45yl7BNIGgIyzmOWKbWaneY5QGFXBU8sTG6Jmc+GevDQ== X-Received: by 2002:a37:8e06:: with SMTP id q6mr2642195qkd.402.1609902301928; Tue, 05 Jan 2021 19:05:01 -0800 (PST) Received: from localhost.localdomain ([2804:14d:72b1:8920:77d4:6fb0:85b3:b6f7]) by smtp.gmail.com with ESMTPSA id n195sm730019qke.20.2021.01.05.19.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 19:05:01 -0800 (PST) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: mchehab@kernel.org, hverkuil@xs4all.nl Cc: "Daniel W. S. Almeida" , linux-media@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] media: vidtv: reinstate sysfs bind attrs Date: Wed, 6 Jan 2021 00:04:47 -0300 Message-Id: <20210106030449.3223172-3-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210106030449.3223172-1-dwlsalmeida@gmail.com> References: <20210106030449.3223172-1-dwlsalmeida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Reinstate sysfs bind attrs so that vidtv can be bound and unbound via sysfs. This is useful for automated regression testing in userspace. Signed-off-by: Daniel W. S. Almeida --- drivers/media/test-drivers/vidtv/vidtv_bridge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index a2fa9b58174d..405e89f62b5a 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -571,7 +571,6 @@ static struct platform_device vidtv_bridge_dev = { static struct platform_driver vidtv_bridge_driver = { .driver = { .name = "vidtv_bridge", - .suppress_bind_attrs = true, }, .probe = vidtv_bridge_probe, .remove = vidtv_bridge_remove, From patchwork Wed Jan 6 03:04:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 358549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0CAA6C4332B for ; Wed, 6 Jan 2021 03:05:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB04C22D6E for ; Wed, 6 Jan 2021 03:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726664AbhAFDFb (ORCPT ); Tue, 5 Jan 2021 22:05:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbhAFDFb (ORCPT ); Tue, 5 Jan 2021 22:05:31 -0500 Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B9DC061358; Tue, 5 Jan 2021 19:05:05 -0800 (PST) Received: by mail-qt1-x82e.google.com with SMTP id b9so1308478qtr.2; Tue, 05 Jan 2021 19:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lKW/iSJjrbgSAXySgNzKmXZFqMqWpYYmhMcxC2gJPf4=; b=nZSO6iZbGxKJXcbAT25lwYlWrvKanic7Tx/yE8sO/QCCguQ8dgTkAl71IgfiMACxwM yjrWYxjxRE+GJZ8F5y3ByVdTMXihUE2Ai4vpDskSVE9KYWwVzzck62Yk/3lqsg9oLncr X+ndpgd5yGK8nkWs4gca+K+noqoVAMBonSU0ym6FHpp9E9+mQnbaTx/mKm+C/1dMCfnt kFMnwyW2Nh5gKTfmFU0KCsURA8D4TrKpbzrvd8+ku3ZQflAQl07cmVoU8w7wDcMUsPSI wPUJcHzbHCFECS1539ElqUk2yTVx08p+ba4Zz/ZSpmCFx4wCb0fdWOnmI7skrVLxzgdb pJNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lKW/iSJjrbgSAXySgNzKmXZFqMqWpYYmhMcxC2gJPf4=; b=Rr+s2f6GLS+J8OpY1Kl4ABksAdw6zr/YBDO3wHy5Jkgq8/1Grwy1lVDI4BwL6ie6lW 4yBoUVu8TBWHfqP/oP7llg6oWA4gl3/A5Xo8iF2IFZ1C+AhC4cmLZUcjvp8xAaCr+PpS YNsAuXH2zp/04QXAS6rgZfY5xGWmK0YeQGtaG+/bV9JvJMjJ+rsbuEyO8r7PxmvGOC80 sRUsvA5QoiFSTl3P0rzsmEMLfUfivQQ/w+x3bQeEbEW9UVA+iWz1F1G/i967jWHNwVZT i97NCgPpL8dKuSxsgVnKiC6h4GqaRTgkJIfIE9me88LXZrZ4iQ5Ez7ACCZhC3Rkmn4PM 4+GA== X-Gm-Message-State: AOAM533YKl9cHEGnlFi1+UDYX6CXHOfPAzJmQatd7YyKptVtRD2RyTdG kn0/MeDf4Ab2FfXzAqKwsvg= X-Google-Smtp-Source: ABdhPJxNJvoNg1gzhOenroDJ0dLzWeV8ux91mzHYWkvLQpKBJBPwu7y+jCoXYkxXw2XhxVPpUsZamg== X-Received: by 2002:ac8:5cce:: with SMTP id s14mr2387647qta.135.1609902304761; Tue, 05 Jan 2021 19:05:04 -0800 (PST) Received: from localhost.localdomain ([2804:14d:72b1:8920:77d4:6fb0:85b3:b6f7]) by smtp.gmail.com with ESMTPSA id n195sm730019qke.20.2021.01.05.19.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 19:05:04 -0800 (PST) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: mchehab@kernel.org, hverkuil@xs4all.nl Cc: "Daniel W. S. Almeida" , linux-media@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] media: vidtv: use a simpler name in platform_{device|driver} Date: Wed, 6 Jan 2021 00:04:48 -0300 Message-Id: <20210106030449.3223172-4-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210106030449.3223172-1-dwlsalmeida@gmail.com> References: <20210106030449.3223172-1-dwlsalmeida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Change from "vidtv_bridge" to simply "vidtv" so that vidtv looks more similar to the other media virtual drivers in /sys/bus/platform. Signed-off-by: Daniel W. S. Almeida --- drivers/media/test-drivers/vidtv/vidtv_bridge.c | 4 ++-- drivers/media/test-drivers/vidtv/vidtv_bridge.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index 405e89f62b5a..9964d1331aff 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -564,13 +564,13 @@ static void vidtv_bridge_dev_release(struct device *dev) } static struct platform_device vidtv_bridge_dev = { - .name = "vidtv_bridge", + .name = VIDTV_PDEV_NAME, .dev.release = vidtv_bridge_dev_release, }; static struct platform_driver vidtv_bridge_driver = { .driver = { - .name = "vidtv_bridge", + .name = VIDTV_PDEV_NAME, }, .probe = vidtv_bridge_probe, .remove = vidtv_bridge_remove, diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.h b/drivers/media/test-drivers/vidtv/vidtv_bridge.h index d42899a31295..101a26a4415f 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.h +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.h @@ -16,6 +16,7 @@ * For now, only one frontend is supported. See vidtv_start_streaming() */ #define NUM_FE 1 +#define VIDTV_PDEV_NAME "vidtv" #include #include From patchwork Wed Jan 6 03:04:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Almeida X-Patchwork-Id: 357820 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAEDDC43381 for ; Wed, 6 Jan 2021 03:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4C1A22D71 for ; Wed, 6 Jan 2021 03:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726718AbhAFDFe (ORCPT ); Tue, 5 Jan 2021 22:05:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725808AbhAFDFd (ORCPT ); Tue, 5 Jan 2021 22:05:33 -0500 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53DEAC061359; Tue, 5 Jan 2021 19:05:08 -0800 (PST) Received: by mail-qt1-x834.google.com with SMTP id z3so1272236qtw.9; Tue, 05 Jan 2021 19:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zHmmCBGfy4ShazVVVDUgrXKI7nP1Rs0OHaoIlOcZSyU=; b=JL2en4yo9zkQGXpTev0LLdXXCf2THcuyHqiHq08UV531nMDdozzMmBTMfv4RzN8CPQ lllYZNvjyJ9qgxB9+8DOs/huEduwu1lZbso+4dQ3cNlajt1gOKr51ZJvHmbYRfRhrZoE 3fpH0TujSELp1PrZzpt4GHK1t+fB6YHnav4W7OtJfm2Xu5LMhz5AXSxTt6SaJtzsvXzs VAqhf+7S1YOfeninpvhpQO2O9LA4FZYvVjrBLAOAVKnsUVtuJc1L7TDMniIz+k2W+nGV MOvJX7FiKFv7LjrYYUga8GG1L2nZHe/KcDBkp5B8zBV/mTny9ane6Ci1USHBxQX7Illn cWlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zHmmCBGfy4ShazVVVDUgrXKI7nP1Rs0OHaoIlOcZSyU=; b=rGT2v/XOAyvIixB21hnpAL0OzRTVZWXrcMzd0Ch7LqWbFEjy/Cqiojiad1lVqy4q/f n88pcDscH79Xsmc5Mitp5KpPNdW9ycjCgSWblAitEv5kcxAZQ+8osT6QcP1i5vZ/wYdR eEBRB3tYcb6ks0Ah1andbVrWsZpCeYsA+uU3/1ay7KkPtTt21oSeHujGcIbAQLYAswiY dnAQtiNjk9UnBGgOp77hk+oZ/SriXyY2VggPK2PT69m4ArQwHU8/3GFy7WGUfauS6HQ+ fh7Ur2Lv/+B1b39380PP3u8+XzLMFoUdEk4O+Cb3s4dBNBbFRUydrWN2n6hVPBOe745/ QDfw== X-Gm-Message-State: AOAM533TPQS8wU/7jk/QaJdDxuEDWrfJE7WDow32fnd2x93qxpopS+Yu 1VV4rjWx/RuYv5ctu1YBUNk= X-Google-Smtp-Source: ABdhPJzHN/EkN4HNuCCqLOYv9mdakCw4XwaOJPrDyI72TQNZVr0TOgJlIqrA83OL2S9wPgHFBL117g== X-Received: by 2002:aed:29a5:: with SMTP id o34mr2365384qtd.379.1609902307535; Tue, 05 Jan 2021 19:05:07 -0800 (PST) Received: from localhost.localdomain ([2804:14d:72b1:8920:77d4:6fb0:85b3:b6f7]) by smtp.gmail.com with ESMTPSA id n195sm730019qke.20.2021.01.05.19.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 19:05:07 -0800 (PST) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: mchehab@kernel.org, hverkuil@xs4all.nl Cc: "Daniel W. S. Almeida" , linux-media@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] media: vidtv: print message when driver is removed Date: Wed, 6 Jan 2021 00:04:49 -0300 Message-Id: <20210106030449.3223172-5-dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210106030449.3223172-1-dwlsalmeida@gmail.com> References: <20210106030449.3223172-1-dwlsalmeida@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: "Daniel W. S. Almeida" Print a message when the driver is removed so that we get some visual confirmation when unbinding vidtv. Signed-off-by: Daniel W. S. Almeida --- drivers/media/test-drivers/vidtv/vidtv_bridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index 9964d1331aff..bde3785333cd 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -555,6 +555,7 @@ static int vidtv_bridge_remove(struct platform_device *pdev) dvb_dmxdev_release(&dvb->dmx_dev); dvb_dmx_release(&dvb->demux); dvb_unregister_adapter(&dvb->adapter); + dev_info(&pdev->dev, "Successfully removed vidtv\n"); return 0; }