From patchwork Fri Sep 3 19:15:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 12475009 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 D042AC433F5 for ; Fri, 3 Sep 2021 19:16:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD80F60FC4 for ; Fri, 3 Sep 2021 19:16:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351024AbhICTRQ (ORCPT ); Fri, 3 Sep 2021 15:17:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350692AbhICTRH (ORCPT ); Fri, 3 Sep 2021 15:17:07 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21284C0617AF for ; Fri, 3 Sep 2021 12:15:58 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id v20-20020a1cf714000000b002e71f4d2026so172638wmh.1 for ; Fri, 03 Sep 2021 12:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rNu7tGzS3a9nNAG4wYt+tSxCNINIYaiwOvt4CtHF4Gs=; b=Xap9Jdp3nzLYXuzX32nrhw5vkzT1dDYR3MNIXg7pN55dkMpHOBgILXtjoi/0CpNJUT 63mcMP6L3e2KSvgdFo0ajFxR8H1fasMGux4Kl/9IeKCkNQPv0R2FLyFGx3OEaD9leGQf uEAVanoTg6Dx0vBBZx4p+zx1769Z/Cujx4m6uPosPv+Z7FoF7zP0gBjRI24O2ZHernDX 1y4TAHtQwWRubWdxYKC3prXPHLCKqvyORE4MAYeZUikm10WRQNCRcaB/eSClVKGd7OeF IZ2zDxMz8nW/UDk1lXjimKbEWxVHd1yRHmIgaV0qDyJwidxEM9s2Fi2znGaueMwoJG9Z k/4A== 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=rNu7tGzS3a9nNAG4wYt+tSxCNINIYaiwOvt4CtHF4Gs=; b=cr+vRWv1Y566s7LVZL1XI6WZ4sk2IL8bwSWoSM752/hkjIjJGX3DOdkh0O7gfzSsGS tCY+kS6afI4mBJB5uUzGVi2mYSZn2oW2Wq2ZFASWMswrBHnk1xG4TXDSRLQlF1UIhEGp Tjy3FG4KexU7zpgFFveGEIK1hG+HRz0ly6+gVBF6qF/LjROnxmqG/8KxLtQImv11Dei0 N/lyo8uSlX8BKW/0Bu4E1w92o5AIgcLWhWIdkhskdNYVefBwtI8BQNtI551CfCZlbNCZ PS/ZcKwtRZMp1lHFzRmC/zQyVv/NxN2Dk8+nJNt35E6je5YQywB3PTqXX3N+qrfC+8qY pkSA== X-Gm-Message-State: AOAM5321UghhgkzruXQyDyXEeAaRf6+Yv8Y7nJ+U2uhlXnejC3FN9oMO vc3fNrIERtr9hct6BZYitgISu/hr6aCbWqnmfLI= X-Google-Smtp-Source: ABdhPJxPYLlcKPA8eUsd93XN+XvF6EEahu/0KHEr3E3wj111ZphQbGeXblq1MpJXfQlxXxyOT4tKeA== X-Received: by 2002:a1c:a50c:: with SMTP id o12mr273659wme.4.1630696556778; Fri, 03 Sep 2021 12:15:56 -0700 (PDT) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id a133sm253397wme.5.2021.09.03.12.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 12:15:56 -0700 (PDT) From: Corentin Labbe To: gregkh@linuxfoundation.org, mchehab@kernel.org Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, mjpeg-users@lists.sourceforge.net, Corentin Labbe Subject: [PATCH 5/8] staging: media: zoran: videocode: remove procfs Date: Fri, 3 Sep 2021 19:15:37 +0000 Message-Id: <20210903191540.3052775-6-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210903191540.3052775-1-clabbe@baylibre.com> References: <20210903191540.3052775-1-clabbe@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Now we have a debugfs, we can remove all PROCFS stuff. We keep videocodec_debugfs_show(), it will be used later Signed-off-by: Corentin Labbe --- drivers/staging/media/zoran/videocodec.c | 24 ++---------------------- drivers/staging/media/zoran/videocodec.h | 5 +++++ 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index 31019b5f377e..3d5a83a07e07 100644 --- a/drivers/staging/media/zoran/videocodec.c +++ b/drivers/staging/media/zoran/videocodec.c @@ -16,14 +16,6 @@ #include #include -// kernel config is here (procfs flag) - -#ifdef CONFIG_PROC_FS -#include -#include -#include -#endif - #include "videocodec.h" static int videocodec_debug; @@ -265,8 +257,8 @@ int videocodec_unregister(const struct videocodec *codec) } EXPORT_SYMBOL(videocodec_unregister); -#ifdef CONFIG_PROC_FS -static int proc_videocodecs_show(struct seq_file *m, void *v) +#ifdef CONFIG_VIDEO_ZORAN_DEBUG +int videocodec_debugfs_show(struct seq_file *m) { struct codec_list *h = codeclist_top; struct attached_list *a; @@ -300,25 +292,13 @@ static int proc_videocodecs_show(struct seq_file *m, void *v) /* ===================== */ static int __init videocodec_init(void) { -#ifdef CONFIG_PROC_FS - static struct proc_dir_entry *videocodec_proc_entry; -#endif - pr_info("Linux video codec intermediate layer: %s\n", VIDEOCODEC_VERSION); -#ifdef CONFIG_PROC_FS - videocodec_proc_entry = proc_create_single("videocodecs", 0, NULL, proc_videocodecs_show); - if (!videocodec_proc_entry) - pr_err("videocodec: can't init procfs.\n"); -#endif return 0; } static void __exit videocodec_exit(void) { -#ifdef CONFIG_PROC_FS - remove_proc_entry("videocodecs", NULL); -#endif } module_init(videocodec_init); diff --git a/drivers/staging/media/zoran/videocodec.h b/drivers/staging/media/zoran/videocodec.h index 8a5003dda9f4..f2e17566795e 100644 --- a/drivers/staging/media/zoran/videocodec.h +++ b/drivers/staging/media/zoran/videocodec.h @@ -123,6 +123,7 @@ M zr36055[1] 0001 0000c001 00000000 (zr36050[1]) #ifndef __LINUX_VIDEOCODEC_H #define __LINUX_VIDEOCODEC_H +#include #include #define CODEC_DO_COMPRESSION 0 @@ -305,4 +306,8 @@ extern int videocodec_unregister(const struct videocodec *); /* the other calls are directly done via the videocodec structure! */ +#ifdef CONFIG_VIDEO_ZORAN_DEBUG +int videocodec_debugfs_show(struct seq_file *m); +#endif + #endif /*ifndef __LINUX_VIDEOCODEC_H */