From patchwork Wed Mar 15 10:00:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 70107 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2251132wrd; Wed, 15 Mar 2023 03:40:59 -0700 (PDT) X-Google-Smtp-Source: AK7set8vwO1ZScIkHAzxfaQN6hxq3Mta1X1PbwEz0acAZLcvFUynVsv3ElDYq1qmfnH0GkfYG0p4 X-Received: by 2002:a05:6a20:3c92:b0:d4:30d2:e8ba with SMTP id b18-20020a056a203c9200b000d430d2e8bamr10429776pzj.12.1678876858883; Wed, 15 Mar 2023 03:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678876858; cv=none; d=google.com; s=arc-20160816; b=u8fKS63O0ZqUlTKi/AE5FQb6Z/r9QmJIN4f9GG5tfwJzv7I8reYB8RexE62Gm51v2H pBYIl2UHkqGMV8ZuvAHSlom9eXL6Eg6+87kniHRaID9ThlSYFJ54aVaJm8xq82ofSrFJ tqPUqxMyQxnG7U27Di0QwmLus8e0XZYnwwBy9GH2ruedU/PeyLGkHYl0AM0zDueUQ+CW GU4Gj70r2Lp/U7TvNqxDnG6TMksIqwuS+8WPbHSWQAyl5AQWXhDtVJ+z9rOUMARzGHwy f0IH03tyX6TkuGQ4mWcPBKdg+RLqqAKb26B5GHXxOydp8MGO85GDuh3e0HpCrAHiI5si oNow== 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=Jt9qgapM8J5DKazv/oWWgNBLPyduMWHrHscsdhszKMY=; b=l3GdVLzVn3d8eoI/1wyQAGEsjauCMSd4OyEO7B6OEXzO59Db4saCzuOtM8Bw49Lwxs YtLdYwRDlzUm5WO1ah3UgqoNFTrBEBUwtekBwCGFWzTlfBbOx+mtnj7NUWh/jeoAR8NK +SAYJtEVTXskLQO1xU7R2YmvA3yP7a/sONq8PBfTDPs2DTFosmzEJiHGyM3AE306npfM ylFKzdwYDXCq7BdOnuGPEqZq6JnFpcNqrxvKje68buqcXp3J5cwS0QCOqkhUcTiU443P wT0fadn27sLDYe7aUYScmVu6UyU355pBypnwDj/hWW5RtRAXvJ9pH0ldlnj85kNH81tn CyAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QEJSqsno; 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=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g124-20020a636b82000000b00502eff43824si4693200pgc.601.2023.03.15.03.40.43; Wed, 15 Mar 2023 03:40:58 -0700 (PDT) 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=@bootlin.com header.s=gm1 header.b=QEJSqsno; 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=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231636AbjCOKDX (ORCPT + 99 others); Wed, 15 Mar 2023 06:03:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232016AbjCOKDD (ORCPT ); Wed, 15 Mar 2023 06:03:03 -0400 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA13FB744 for ; Wed, 15 Mar 2023 03:01:43 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id E73A9240011; Wed, 15 Mar 2023 10:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1678874501; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jt9qgapM8J5DKazv/oWWgNBLPyduMWHrHscsdhszKMY=; b=QEJSqsnoSJ+269GXUhQjsEnllspJdika/YcF8pLZT6HGJNwtoOQW2P56DGh8xsH2bZ/9s/ FxQOG/nuvRO8c4CDCeRtWVmHjGk2hcqtGkuw79SFFcZRmb6y0f69hsk+iS8igKN/rYy1sq EXDqLo2gTjBg/T1AZXqLmwmLc4rXorhcv4SpUYTSbib2WTCdNFBRSL3myVjraMX1zCPfVZ kv8bE/I6mpsYEZuxy4JzQCcWsUMLFZWCGaAupqM9yFSX+qdnvtdKYBcE/prkaEhbWuOpt3 /52djAPVy/Os+78FLGVI7f0rKanznUI/P3HGZsm+9Bp2hueT0dZB/oKr+JJ50Q== From: Miquel Raynal To: Srinivas Kandagatla , Greg Kroah-Hartman , Cc: Michael Walle , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Robert Marko , Luka Perkov , Thomas Petazzoni , Miquel Raynal Subject: [PATCH 2/4] nvmem: layouts: sl28vpd: Use module_nvmem_layout_driver() Date: Wed, 15 Mar 2023 11:00:16 +0100 Message-Id: <20230315100018.1660071-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230315100018.1660071-1-miquel.raynal@bootlin.com> References: <20230315100018.1660071-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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?1760429981058113515?= X-GMAIL-MSGID: =?utf-8?q?1760429981058113515?= Stop open-coding the module init/exit functions. Use the module_nvmem_layout_driver() instead. Signed-off-by: Miquel Raynal --- drivers/nvmem/layouts/sl28vpd.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/nvmem/layouts/sl28vpd.c b/drivers/nvmem/layouts/sl28vpd.c index 9370e41bad73..9cc1715c2fd5 100644 --- a/drivers/nvmem/layouts/sl28vpd.c +++ b/drivers/nvmem/layouts/sl28vpd.c @@ -146,19 +146,7 @@ struct nvmem_layout sl28vpd_layout = { .of_match_table = sl28vpd_of_match_table, .add_cells = sl28vpd_add_cells, }; - -static int __init sl28vpd_init(void) -{ - return nvmem_layout_register(&sl28vpd_layout); -} - -static void __exit sl28vpd_exit(void) -{ - nvmem_layout_unregister(&sl28vpd_layout); -} - -module_init(sl28vpd_init); -module_exit(sl28vpd_exit); +module_nvmem_layout_driver(sl28vpd_layout); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Michael Walle ");