From patchwork Thu Feb 16 13:00:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 58053 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp285516wrn; Thu, 16 Feb 2023 05:01:14 -0800 (PST) X-Google-Smtp-Source: AK7set+Ct2v1kP71hVAJJEYGQxL2OZrPCHKklIFhE6KK9nhezXW/IUfcdvLkIpJODPIrqU5dJKEk X-Received: by 2002:a17:906:a451:b0:86f:fbcf:f30a with SMTP id cb17-20020a170906a45100b0086ffbcff30amr6772766ejb.58.1676552473962; Thu, 16 Feb 2023 05:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676552473; cv=none; d=google.com; s=arc-20160816; b=l/3SHcWx7cP95VWTrGpdGAGDevc6wINdCCjCn+uZraRM++MxFDo6tfd94jvz+wJdsu yq5WAdNs9mMeGMqUPDSnEOeRUwS2KIODtqE4v2QSVe5s7qmuBr93ZhkOx0vwCiez8jDK VZVoJaj5xZEgstNFjdzyiP7o88evWwAJVjUb79k1qYnvzHBClIQeQ/N0nHuaC7YE5sS/ OPiTRkW8cftC4QAtykmENJEJPqL29heBrGj4hr3gNprlvp4ktKVv18+G29W27knMrrnO qXzOHKF5Vw0jB8dhgSXcDphm53x2o7YrdPhiTLQFp44/fjey+gD0akj1mT3fm2NOfNwj fbIQ== 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=x3PAcKwKR56X15WnNWigLtK2CQoO70A8cfeBgYyEtq0=; b=RyqztTdMbjnrY1BVJLx7AR9VtsRnbG4tT7i0R66fkz2T8z96tc/p+ofCKxOFpSBwkp aIsBAU1hvuR6m2+6nXGDee4KiMWwxT6qRWU8XBsGHN9uwl+W15YRV81Yg+f0AUG3GnFX B2Qd2DLnbbFyoOE1WeyNY82zzE0uZ7UUsvZBUNaNEkwF5WbAvecAfC7iP8aTWuV5wHuB AnJRHxqyW3S7t16ESmcs4+PFa9MJfPbh9lsxXyVYs7B/hLKIB9ZHhCV3GRX/++LHqNYQ iGWTo+4awG2+DOZvj5mqvv/cKEmmt6K8ZzApKklr6ypeI+dDeWLY8UAzRSmQeMg34tCe dDeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cWy8JSqx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m26-20020a170906599a00b008b147554303si1790789ejs.991.2023.02.16.05.00.49; Thu, 16 Feb 2023 05:01:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cWy8JSqx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbjBPNAg (ORCPT + 99 others); Thu, 16 Feb 2023 08:00:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbjBPNAa (ORCPT ); Thu, 16 Feb 2023 08:00:30 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C3443D098 for ; Thu, 16 Feb 2023 05:00:29 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id AF7F166021A8; Thu, 16 Feb 2023 13:00:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676552428; bh=akKsNWR5T+Lv1H5lxALji7s6hzqhOq0hzyQywZA1KxE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cWy8JSqxDFC+vrCbBbLvJLBzpjUhLpwI000YFJ/nt88WfbpXed9qQQUGTfxOVquhK 4bvLeXlyB6AUiZJcFJ9s4NyVDeqRa0H1hijpHGnYvqnu8LezJSNiTlpex96224zqI+ MNdn9ak+BA/oBubolhXyc7MJlavl30TkstyMRYj4MNxl1yNUnyjBL8lwm3BAHn21gr HGIrbvlit/obWtnnzQ8kpmXH6FL0SAOjRxFDqc8/QBWVVxlUqaDUjpwy7RmOFMnAWZ lM5FbNih59+3d6iY/ZGVjD7fu0NSFybpgviQeTSdfhclSIV8L8IYIb/ikDf82/eF5d xextHCvrDFBSg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: jason-jh.lin@mediatek.com, chunkuang.hu@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, AngeloGioacchino Del Regno Subject: [PATCH v1 2/9] soc: mediatek: mtk-mmsys: Use module_platform_driver() macro Date: Thu, 16 Feb 2023 14:00:14 +0100 Message-Id: <20230216130021.64875-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230216130021.64875-1-angelogioacchino.delregno@collabora.com> References: <20230216130021.64875-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757992687065622939?= X-GMAIL-MSGID: =?utf-8?q?1757992687065622939?= Instead of open-coding init/exit calls, switch to using the module_platform_driver() macro instead, doing the exact same. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai --- drivers/soc/mediatek/mtk-mmsys.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index af22f3490034..1a574de9484d 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -447,19 +447,7 @@ static struct platform_driver mtk_mmsys_drv = { .probe = mtk_mmsys_probe, .remove = mtk_mmsys_remove, }; - -static int __init mtk_mmsys_init(void) -{ - return platform_driver_register(&mtk_mmsys_drv); -} - -static void __exit mtk_mmsys_exit(void) -{ - platform_driver_unregister(&mtk_mmsys_drv); -} - -module_init(mtk_mmsys_init); -module_exit(mtk_mmsys_exit); +module_platform_driver(mtk_mmsys_drv); MODULE_AUTHOR("Yongqiang Niu "); MODULE_DESCRIPTION("MediaTek SoC MMSYS driver");