Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1942079pxk; Sun, 13 Sep 2020 23:35:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/KQJKGqCdCIKI021L6eNX7nYkCY1X9LvOYujbWlFXk/CeYfoMiTL3Og0VyCMEefd2zvlD X-Received: by 2002:aa7:dc16:: with SMTP id b22mr15510182edu.252.1600065348464; Sun, 13 Sep 2020 23:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600065348; cv=none; d=google.com; s=arc-20160816; b=NO6nWnK6UJBN6sezxtmo2eBMvA/5ZiAOlObdwJ8/tmdBjawqorVAEuK+zsIxYyqFLR UIfooOfkXhesGj7veb/ze8zaPPit2nIu220M7m105kW2YEOLjCMOjKrNF0pP0deTc6DU qYgD8cOyR1YiWB4IJjyh/N+JdPS0vJd2d0h5CO/k5pjYNSmZt4NkHRoQ8Bd53JmOGpYf 9eCosz//ZLYgL4/T+cE3q677w+oVRR5Z1OyRo9zito82YPPR5gRDQ/yjdW7jxOdi7Ozv F2XQ5g1AoD6ZZHfBp9Qj9ogY1j8HNh1DDw5W4xdmd+oMYGyAWdzxIShH+VrWgKi2PULo LTaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ouk2lTQkHpaBfAH4xyC82l3mxoFnjfhW0Kpb2mfKrXw=; b=u1HzMgNHcNM2bk7LPWHTFocAKz44SSnuvKrnySmeBwDBTn+jfeE+XVtNcG27V43rhf x+jtiEa3Nm7PQHQHZ2BdColrTdH/qqktGeOtLrW5BuVJK2HGDKmqnxKFW9dCWCa72kgU D02jsx4kUMgNeGu3DWGjrwhoe7iXGk9XrIKhsmlGmRBJkGINnABATBkf9WfDhkNMwCCT SrUTmm7YIRY9wY1qco9jPKrSgEwFIDwLH3Rt0zcx6XehCvLWj9UkLK3mFPu4kSys4yQu IOHV0FGfbNn6occIhFT+KVaEQi3dpZJAtrtfMx0RpOFM7v1PH1o0Ic7nKobjQZl1Q2WQ c3LA== ARC-Authentication-Results: i=1; mx.google.com; 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 j24si6363245edt.105.2020.09.13.23.35.26; Sun, 13 Sep 2020 23:35:48 -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; 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 S1726130AbgINGcB (ORCPT + 99 others); Mon, 14 Sep 2020 02:32:01 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:45792 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726078AbgINGbb (ORCPT ); Mon, 14 Sep 2020 02:31:31 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2733BEA770FA9B6ED669; Mon, 14 Sep 2020 14:31:27 +0800 (CST) Received: from huawei.com (10.175.113.32) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Mon, 14 Sep 2020 14:31:20 +0800 From: Liu Shixin To: MyungJoo Ham , Chanwoo Choi , Chen-Yu Tsai , Hans de Goede CC: , Liu Shixin Subject: [PATCH -next] extcon: axp288: use module_platform_driver to simplify the code Date: Mon, 14 Sep 2020 14:54:00 +0800 Message-ID: <20200914065400.3726302-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.32] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin --- drivers/extcon/extcon-axp288.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index 525345367260..fdb31954cf2b 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c @@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = { .pm = &axp288_extcon_pm_ops, }, }; - -static int __init axp288_extcon_init(void) -{ - return platform_driver_register(&axp288_extcon_driver); -} -module_init(axp288_extcon_init); - -static void __exit axp288_extcon_exit(void) -{ - platform_driver_unregister(&axp288_extcon_driver); -} -module_exit(axp288_extcon_exit); +module_platform_driver(axp288_extcon_driver); MODULE_AUTHOR("Ramakrishna Pallala "); MODULE_AUTHOR("Hans de Goede "); -- 2.25.1