From patchwork Fri Aug 14 11:07:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11714365 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5CDC1392 for ; Fri, 14 Aug 2020 11:07:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5562207DA for ; Fri, 14 Aug 2020 11:07:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726444AbgHNLHj (ORCPT ); Fri, 14 Aug 2020 07:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgHNLHi (ORCPT ); Fri, 14 Aug 2020 07:07:38 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3735AC061388 for ; Fri, 14 Aug 2020 04:07:37 -0700 (PDT) Received: from ramsan ([84.195.186.194]) by michel.telenet-ops.be with bizsmtp id FP7Y230064C55Sk06P7Y3w; Fri, 14 Aug 2020 13:07:33 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1k6XYa-0003rB-DJ; Fri, 14 Aug 2020 13:07:32 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1k6XYa-0007Z8-CL; Fri, 14 Aug 2020 13:07:32 +0200 From: Geert Uytterhoeven To: Alessandro Zummo , Alexandre Belloni Cc: Nobuhiro Iwamatsu , kogiidena , Adrian Glaubitz , linux-rtc@vger.kernel.org, linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 3/3] rtc: rtc-rs5c313: Convert to module_platform_driver() Date: Fri, 14 Aug 2020 13:07:31 +0200 Message-Id: <20200814110731.29029-4-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200814110731.29029-1-geert+renesas@glider.be> References: <20200814110731.29029-1-geert+renesas@glider.be> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Reduce boilerplate by using the module_platform_driver() helper. Signed-off-by: Geert Uytterhoeven --- drivers/rtc/rtc-rs5c313.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c index af72e428b218173e..e98f85f34206f16c 100644 --- a/drivers/rtc/rtc-rs5c313.c +++ b/drivers/rtc/rtc-rs5c313.c @@ -384,18 +384,7 @@ static struct platform_driver rs5c313_rtc_platform_driver = { .probe = rs5c313_rtc_probe, }; -static int __init rs5c313_rtc_init(void) -{ - return platform_driver_register(&rs5c313_rtc_platform_driver); -} - -static void __exit rs5c313_rtc_exit(void) -{ - platform_driver_unregister(&rs5c313_rtc_platform_driver); -} - -module_init(rs5c313_rtc_init); -module_exit(rs5c313_rtc_exit); +module_platform_driver(rs5c313_rtc_platform_driver); MODULE_AUTHOR("kogiidena , Nobuhiro Iwamatsu "); MODULE_DESCRIPTION("Ricoh RS5C313 RTC device driver");