Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3742420pxb; Wed, 13 Oct 2021 12:01:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxAE9sCTfQBAwvPDiVy0eMUUtFfm7WP+5czzSGM9PjVrgCrZk02e/LTcmkxPfN8yoY/X0N X-Received: by 2002:a17:906:4fc7:: with SMTP id i7mr1281614ejw.14.1634151674526; Wed, 13 Oct 2021 12:01:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634151674; cv=none; d=google.com; s=arc-20160816; b=PnSSAK0Q3xtLXom+ERcZsZG93JQ3/HXGIAuvTS3DkLZreJ0ixhxR9rnEYTXGAKgPa+ tIBsy7WUZY4sWmZWcaL5Y4AI0eyhl9AWGoEyDFail23tv55VnCOru5XiYFcbBqLoIejn NBNQHfKPmUGk7fGHu0S/Gu52q0Iw8avM8KJQfi+QepzMpEToAekMMCiE5OuA9w5Riuw4 V7xW5h1eP9Fsap02VfvX+ai6VjMR/2Cf3HskK8NkXeuDKnExaDDlH8YKwnfcmi+lU38b WMGcCzLk67t/3wBIgod9/36Hz/PmnLnIvKKWHnb2SnQkYdtpLzBMFq2SHt8Xiqt+lWkZ F6Mg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZX+m9eRP3G6qa3o26UuCwjfzdvb0rxacvbcUwg9LjVM=; b=nxZI7CoWtFo4h3nryhoMHfD9Z9/JbhH+++9AM4izqjVbgXusdC/6LW5VDWKAV2p14L 6b4gkOFFE9x4Kcky9QX68cVKNChGQC36P2FsjMbVKAb31inq7ROpR4E7lO4m2xsSM7fn lYlFt+s72yAaoNjeY3hmPUKF/tnjPoT6cA+XGYxVIV4V9MulKWOxp7okBKQV8JbCfdFi +5cd4cYCFzTTKqB06td0pnaGPmiGzOZADgBoRLRSi+xQ1RhAgjc3Q2/pdv1vniJltPlI 9d4UumEPCFJdofDSB21a0jtuZdPtUglK6B0y/yCBnSihL7C7AlW4p12py392i/ESLJYj onGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=0fraruSs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do11si784089ejc.546.2021.10.13.12.00.46; Wed, 13 Oct 2021 12:01:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=0fraruSs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238920AbhJMTAa (ORCPT + 99 others); Wed, 13 Oct 2021 15:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231522AbhJMTAY (ORCPT ); Wed, 13 Oct 2021 15:00:24 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D0ECC06174E for ; Wed, 13 Oct 2021 11:58:21 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id e3so11446098wrc.11 for ; Wed, 13 Oct 2021 11:58:21 -0700 (PDT) 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=ZX+m9eRP3G6qa3o26UuCwjfzdvb0rxacvbcUwg9LjVM=; b=0fraruSs5JA2w0zlm1r62hMvuaG/kbbnuWMCWFTQWqJsVmi2r/Ro+6EYSWtmqJvTYq w5ipymlSp5yAX+FxAGnY2hQnmmUxEbcoXoESQ5WNPIQIfRZ+4a56Kw5HTNsGol55NIJl gm/w8rVI5neU2OiqkPrOmgGoue0G36l2uL1ldpjo1qroSLzzoJ3P2+Zs7NQe4z30WCTu emnSgxxat5ShTB3byfnqT1/+C941aLMrH6T3LxFE/UWOZr6IRwSzRVtFAgLlZqgkFuXn G4NUol0ZVP7ugV6A6x0tSlFE51wGUDnjJnPsqvoqSXbtO7CEMQb18QzQOYhlSJyx3NXN 1YeA== 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=ZX+m9eRP3G6qa3o26UuCwjfzdvb0rxacvbcUwg9LjVM=; b=bzHB4IVoMW69pnXl5H5+EuayzGkhxx2AjIIc5P+l1uasoKuEPVaM0cwJEV0h7QC9Yt IgJH0MCV2s3mDWczdoWK9l6xGsTcyAilqygSLs3KaqdpjP8GY7dBozwDgP93UqfTUVq7 u8tqsJhglTAUbZUqcFm6dir6QYI2NeTKoa6HsjEv+fuMgRgZxbJwXxAg+p+7yUJENXxE sr+2BjtiJVnN7hYhHzAuCobVr5cYYG136SZvNsM2r+lfpQ/smq0vnhePqb3dlRAxC8so 3Dh6rGW9/2kyS0tWdM+BaMzi0YjjJvEB94UjVSstsHdo+UQfpDzDOkmpvTx93dO7KGE9 ahTA== X-Gm-Message-State: AOAM532g07CwmlpdXLvB5e+eaNc0NsWIKnkqs/D9nO9VX2ME+rSbZO+G zW10BZVXdEQyiEDyAcAFzdK+Eg== X-Received: by 2002:a5d:6481:: with SMTP id o1mr1105102wri.60.1634151499697; Wed, 13 Oct 2021 11:58:19 -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 e8sm573059wrg.48.2021.10.13.11.58.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 11:58:19 -0700 (PDT) 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 v2 02/10] staging: media: zoran: use module_pci_driver Date: Wed, 13 Oct 2021 18:58:04 +0000 Message-Id: <20211013185812.590931-3-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013185812.590931-1-clabbe@baylibre.com> References: <20211013185812.590931-1-clabbe@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Simplify code by using module_pci_driver() Signed-off-by: Corentin Labbe --- drivers/staging/media/zoran/zoran_card.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/staging/media/zoran/zoran_card.c b/drivers/staging/media/zoran/zoran_card.c index 3bc0e64f1007..f1465fbf98af 100644 --- a/drivers/staging/media/zoran/zoran_card.c +++ b/drivers/staging/media/zoran/zoran_card.c @@ -1314,23 +1314,4 @@ static struct pci_driver zoran_driver = { .remove = zoran_remove, }; -static int __init zoran_init(void) -{ - int res; - - res = pci_register_driver(&zoran_driver); - if (res) { - pr_err("Unable to register ZR36057 driver\n"); - return res; - } - - return 0; -} - -static void __exit zoran_exit(void) -{ - pci_unregister_driver(&zoran_driver); -} - -module_init(zoran_init); -module_exit(zoran_exit); +module_pci_driver(zoran_driver); -- 2.32.0