From patchwork Wed Nov 23 14:56:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9443559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95A7760235 for ; Wed, 23 Nov 2016 14:58:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A0B626CFF for ; Wed, 23 Nov 2016 14:58:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F09526D19; Wed, 23 Nov 2016 14:58:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28B2726CFF for ; Wed, 23 Nov 2016 14:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938587AbcKWO5S (ORCPT ); Wed, 23 Nov 2016 09:57:18 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35074 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964884AbcKWO5A (ORCPT ); Wed, 23 Nov 2016 09:57:00 -0500 Received: by mail-pg0-f68.google.com with SMTP id p66so1264768pga.2; Wed, 23 Nov 2016 06:56:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=MMLiibI20SZpuhK2D3z4POHV0wbOjt7o8Z9jFcK/j6s=; b=VGJ6LzWp1PLJ5CzBj4Zy/cbf6bAqHthI7A4Vw/J9/bkg2MP1KCh1HJavu68ruJNVgg ckSv9vkPnDunqltP2fmPMxuEXMh6Z9KvVhUZ0IYaHLoFYdbbujU7OOHDNxoc+XigXW/9 +9n9IMG2imZJUC5Ji9xmRogiSRxSmY20RdQRjZtmKKDh2VC11T/z+dA4F4wNZn3WpBzM yc2akeycALyKJTGSMWUPGkxYaLJLRTRU6ehQ/RBFz6P2os6bXU0pXqKhaYhFtKhJRlDo iOXr/kRJhxgKyMJt700/wU3GYy/6Wz5cN4Uj86dVyB992O6qqacDlGWxCayTZFaFNncJ qX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MMLiibI20SZpuhK2D3z4POHV0wbOjt7o8Z9jFcK/j6s=; b=c5Lq2g7LBCFrGAnlwb7749ACf50KFKWFwBusUcduDzNzALiL8Gk0L+5cJKchSLwWiJ w0sUlLGTdIUh5vziW7jQSNKlWDAfZw1C6iV0dOLaVsDp42tqPLuL5FuLeUtOVEl7+v09 JSI3JpvLd2tUoyEYji3BGAtngFdROU3S8cs9OzvE3giqq3TWMoaXx74oX6VqrEawkuio 4EavDr2i+I8/d2TBeum2ekj2Ex8jekdjPBHoWaN4x91O1faltWECJR8JYZiHB2Q0iHqH AL9Co1tdoirl+BU5otllPR2muR5DHht050NWBas4ziWKHxfF2+vuIcVxpWv5sFynO07z sCjg== X-Gm-Message-State: AKaTC0078z4kzesbV3n4It637EBUn1w+UVXpR69LWm2ZTYUneAvXLDD30UJP84wJsJndQQ== X-Received: by 10.99.66.198 with SMTP id p189mr5947891pga.30.1479913019428; Wed, 23 Nov 2016 06:56:59 -0800 (PST) Received: from localhost (li411-102.members.linode.com. [106.187.91.102]) by smtp.gmail.com with ESMTPSA id a1sm35605250pgf.16.2016.11.23.06.56.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Nov 2016 06:56:59 -0800 (PST) From: Geliang Tang To: Sebastian Reichel Cc: Geliang Tang , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] power: ab8500_btemp: use builtin_platform_driver Date: Wed, 23 Nov 2016 22:56:52 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use builtin_platform_driver() helper to simplify the code. Signed-off-by: Geliang Tang --- drivers/power/supply/ab8500_btemp.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c index 6ffdc18..f925e50 100644 --- a/drivers/power/supply/ab8500_btemp.c +++ b/drivers/power/supply/ab8500_btemp.c @@ -1193,17 +1193,12 @@ static struct platform_driver ab8500_btemp_driver = { }, }; -static int __init ab8500_btemp_init(void) -{ - return platform_driver_register(&ab8500_btemp_driver); -} - static void __exit ab8500_btemp_exit(void) { platform_driver_unregister(&ab8500_btemp_driver); } -device_initcall(ab8500_btemp_init); +builtin_platform_driver(ab8500_btemp_driver); module_exit(ab8500_btemp_exit); MODULE_LICENSE("GPL v2");