From patchwork Tue Dec 14 16:16:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 523840 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F104C433EF for ; Tue, 14 Dec 2021 16:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbhLNQS4 (ORCPT ); Tue, 14 Dec 2021 11:18:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235619AbhLNQQr (ORCPT ); Tue, 14 Dec 2021 11:16:47 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30573C061401 for ; Tue, 14 Dec 2021 08:16:47 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id p27-20020a05600c1d9b00b0033bf8532855so14107226wms.3 for ; Tue, 14 Dec 2021 08:16:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9d00CQxtuLbmKfZQEqLshscWS8poY4p1Q3lozDp6W9U=; b=SbE3bx+f/5vebISeux3XOeD2/aNUqaQrcGjt3G0WBt07k4+KjXOXMkOj2WEuEH+E3M I5IKN+AWdv18rkV7KuY46s0BFTo3fL6X/+pFlAxpWAN0peeUcujLQm7JX9fflkV92lZE kQXHf6kIL3cIqybWH0JG7yJZ+6UCSUm/aTgP5xxizgpx04PhaXggF1yukYCBLH/jnbbp 8i/cW9pTBL59dp3zusGeCLQQpMCABRwJ75FHqp+tg5so3vDe4QPPyIrM3kMqsNBAe1Fq ng9a5vfhSgSB4oJF3KbJQeCjRQwxD4nSDi/69hoPIKYynBsekIzz9+kLEd9TiMS3c9lj 2XjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9d00CQxtuLbmKfZQEqLshscWS8poY4p1Q3lozDp6W9U=; b=ab2+q+FCLxkvhKDR8XKLMmtI48LluWJuAh0Lh6FuuJuZCW7gSqH5SU0BoJYWZsUTXq K/BisO9ilAN/jo1z+ECL+9l955PKRYKwQhvsuaE92VyIdTxoY8KSFkzNFP0redFdfBkb Bi8wWxo25pOjVSsNHT9fxWiB7fbPiblqlw53PR0CnVDoO0R7yETxUDQkN+ILHlvyUaug PCjrpvuycjXjqb1voGNbBhKvszhKCkz7QMKtmZasaBC9OVuLaCU/OJFz1jQRtOFowryP 2u3gu556VJln7EnbKAHgAkVym0Jw95RcxgfNuKa0xxny4TlNAwLfr50LHcnudvgnBQD9 35ZA== X-Gm-Message-State: AOAM530tuQ5bHJk8J72Tge+V7rPyAU+8KoSjFjiXnSBIoMK6rIfvegmx 4uJu0JAXIm5XwnP7bPkag0Thhg== X-Google-Smtp-Source: ABdhPJxT+E9CvwN1wHLmBTZX39LG4/yvi+mSQhr8wnCEGOY+hEFTHWQf2InARJC78rU3psWOJsVn1g== X-Received: by 2002:a05:600c:1914:: with SMTP id j20mr47607517wmq.26.1639498605740; Tue, 14 Dec 2021 08:16:45 -0800 (PST) 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 a9sm295116wrt.66.2021.12.14.08.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Dec 2021 08:16:45 -0800 (PST) From: Corentin Labbe To: mchehab@kernel.org, hverkuil@xs4all.nl, gregkh@linuxfoundation.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 v4 05/18] staging: media: zoran: videocode: remove procfs Date: Tue, 14 Dec 2021 16:16:23 +0000 Message-Id: <20211214161636.1886900-6-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211214161636.1886900-1-clabbe@baylibre.com> References: <20211214161636.1886900-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 | 3 +++ 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/staging/media/zoran/videocodec.c b/drivers/staging/media/zoran/videocodec.c index 31019b5f377e..5bab7ba56257 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,7 @@ 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) +int videocodec_debugfs_show(struct seq_file *m) { struct codec_list *h = codeclist_top; struct attached_list *a; @@ -293,32 +284,19 @@ static int proc_videocodecs_show(struct seq_file *m, void *v) return 0; } -#endif /* ===================== */ /* hook in driver module */ /* ===================== */ 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..3a508d326049 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,6 @@ extern int videocodec_unregister(const struct videocodec *); /* the other calls are directly done via the videocodec structure! */ +int videocodec_debugfs_show(struct seq_file *m); + #endif /*ifndef __LINUX_VIDEOCODEC_H */