Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2868179ybi; Mon, 17 Jun 2019 11:45:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyb7ElJ9mY6ovrRO3qguSRfelC25oJM4v68SywVfEsqiQ+XaVWzRWarf9EV9RepnVv0BSR7 X-Received: by 2002:a62:ed1a:: with SMTP id u26mr89820594pfh.229.1560797101356; Mon, 17 Jun 2019 11:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560797101; cv=none; d=google.com; s=arc-20160816; b=CoeEeB9GjU5EZ+5b9JzpCurMZwJ4D+B/B3Ca5UtdKRqVWPq0zzRRiv18ITkHevHAIR O1SdLZB9noeQ+GSLn5XBkeixt+Dh7374fyShk5Cf647IO5bmtW/zXm9wG4UU5PDluFum Ip/QyhONTUjjMu7lC9WVuhXNfwI6524hV/YNkOK+zbbviQEjMj8XKX2uQBhhoL3Z+eHN M9lV+MRNrpgwr0nI/G0X20DsKngYphkSwmNro1il5zXJS/6wbmX1qRCkO8msYY5UUyI1 LKl6rl2Ws/5tfkJpM4CMBpwZJIvxcQkik4+W/WFjhFXHH6muJ8Vg3sSb7rV4incssJlf AD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=JTXYRZt0nh6LodmBuO/LVCnmk8FuOr8r4JcxJXd48R8=; b=Zq4iuxSav8CdeDfEmwPtCNomxi4KpVxmiKBpAfm/+VPgiuueVHnxEpOrBKbj2czuem zEL+3LsZ3zo75/a3LV2Ybd9ULvO0eHRXpC75yfIY1b0pW5gM0kyqvLqOCG7A35V1L/fX HS2SZmthI6quOykqkXA+Djlen4ndK7jzacKM/b1a5GJgl288ovFKuq3TMLPN9W2+PauI Ue+amOcNoSHMqaaCjs8XhIL9PTn9E7M6drBFLmXUiCQXse52H+syY1lSEo0j6SG7FM1O 0HZYRq7dvWFso+/LVkgUEPcgWOY9vnSyAvW40DAlM7/6IJYmC3UwG400e9DeqE+vg/ip s0Yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si11286315pgm.227.2019.06.17.11.44.46; Mon, 17 Jun 2019 11:45:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728762AbfFQSlt (ORCPT + 99 others); Mon, 17 Jun 2019 14:41:49 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:55069 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfFQSln (ORCPT ); Mon, 17 Jun 2019 14:41:43 -0400 Received: from orion.localdomain ([77.2.173.233]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MowSu-1iPkr60HhG-00qVKy; Mon, 17 Jun 2019 20:41:22 +0200 From: "Enrico Weigelt, metux IT consult" To: linux-kernel@vger.kernel.org Cc: thloh@altera.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, andriy.shevchenko@linux.intel.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, grygorii.strashko@ti.com, ssantosh@kernel.org, khilman@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 02/30] drivers: gpio: altera: use subsys_platform_driver() Date: Mon, 17 Jun 2019 20:40:43 +0200 Message-Id: <1560796871-18560-2-git-send-email-info@metux.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1560796871-18560-1-git-send-email-info@metux.net> References: <1560796871-18560-1-git-send-email-info@metux.net> X-Provags-ID: V03:K1:n6lNF/HiERfH9tPVBrtbF8cjwb9Kd5R4hEw89zBMMBUSS2AViuC 4gJyGnofyR32s6hyLipxjrmtm0hVyHI6gjievevJWOve7tRnvPBcIMtAJw7wKJhAWq5rDjj Iyj9m7RQrAUUKBSUGqHD1PBvmVAELc1atMNKegIh8gMZfgg4yV3opmtlH4Fg5chMY3jfnUb MdYDYDeTK0EIp4a8LH4YA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FubfsVQejOg=:hcx/YkqnedyIVid8oMi3jN yFOL1ldrSamVyPD1XqgcK7HgFK+YLZiUZ5yvtylcHhNZk5uHA+E7qZ88wMhHMfx/G6qICZD0t kUFz1TDSL2m3B39o8Io548h4eFN/QTaqpPmDIe0dunWwnR1niVaJ+u0P0aqZd25Dz4V8TegoU pnvj81x//YNVy2u9bJ0kzKQxjgLvAtc83GT8hRXOiDQFPm9mriTFPaw1bpeR1oNppt0pK83dJ dD3mH7BDynA0Q4gJRNVe3ofzSKpACg3mGS7U9Vq2lYVKtrr/SyraobT8ddVtOx3qWQIW4RD3v fjskP8Mt6UrUjEJDI1a4nmMvvYdD07zeobqRexYJCodR3kxAkE8iDK5liLpetva6eRoNkJjFX b9uKQXHWqbf4vnKcgKhkMLaddWIxFDwa4F2DxlBbqF9Z5OSAq8vVPA2y06vqu/VVEtOAra6v5 K89jcHmBOGrt2YxGcaQO4ADJoAFw3n+DDbQL7f+fjeIJDS3PS0S3hoA0Wz14HnVEeV+yD6LSd rzL3OApCEIKrUxcGx9Z4W21lsMRMqPj7+3/YclHcYNUiad8gv47ZcU1aICcAME4tCBOv6a9Ko GGL12YFdJN5kIorHVpjmaAXnznWQPuaMSTNIur8CLGbRii4Vg63T6blfjBi4swjCMcib4ojaD 48A8xT3tkMu3KlL2VaZbvNvw/u0D38Ga6DgmOIxmWdQbhVbYsS4c09qzB2a/ebj+8aJS6Lcbk 3G/hwmRXYSg8ea7msahEPVimEv97KizsfoZKPw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Enrico Weigelt Reduce driver init boilerplate by using the new subsys_platform_driver() macro. Signed-off-by: Enrico Weigelt --- drivers/gpio/gpio-altera.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c index e088b90..b757c650 100644 --- a/drivers/gpio/gpio-altera.c +++ b/drivers/gpio/gpio-altera.c @@ -342,18 +342,7 @@ static int altera_gpio_remove(struct platform_device *pdev) .probe = altera_gpio_probe, .remove = altera_gpio_remove, }; - -static int __init altera_gpio_init(void) -{ - return platform_driver_register(&altera_gpio_driver); -} -subsys_initcall(altera_gpio_init); - -static void __exit altera_gpio_exit(void) -{ - platform_driver_unregister(&altera_gpio_driver); -} -module_exit(altera_gpio_exit); +subsys_platform_driver(altera_gpio_driver); MODULE_AUTHOR("Tien Hock Loh "); MODULE_DESCRIPTION("Altera GPIO driver"); -- 1.9.1