From patchwork Wed Mar 22 16:58:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 73542 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2460447wrt; Wed, 22 Mar 2023 10:15:42 -0700 (PDT) X-Google-Smtp-Source: AK7set9h+/6g/RApn7TezA8AQTFZiIwFXaB+Ver0H4t5tXNoaRkCorTuNs8D8jwNgtFyNzKzlQX5 X-Received: by 2002:a17:902:c651:b0:1a0:50bd:31c0 with SMTP id s17-20020a170902c65100b001a050bd31c0mr2754194pls.24.1679505341776; Wed, 22 Mar 2023 10:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679505341; cv=none; d=google.com; s=arc-20160816; b=kskvyCWYGjUrTkMSMcyBNxMK7W/zaN5YnfuIlv1JcD2WLvok2jgOxne8/Sb+9Jg4/b o6kpSStPLdHambt4x6KxFcXcd/sfZozMJh5Kwz1YoqFV4fjuQGcoB2DgRt7xw2vLF2Zz uKk2QYJ4dWx6K+IK+FYFf9FCZkMVh7MUJv7HFL4dZvWRkDemieOkP0aKeMjm32vu4XB9 DgUhQ68/EKLwU4U/rHNXTCClGn/MP15+qAHhpmrwLEYrWZjgxdoXUI/iqFuUwEIaeBkG J4IG4ZlfxxsSnpAFoYvTlzl+xVTAvv+ttauOB2UPLpnT2LzeJR/N8Pzp3Ivh2APE0kSs 3NJg== 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=G1do/+EN2p+5+PvMdLZ6x0R33OrVawbHTt7gEu3eRQ+MXuWtsEouowEfFMFPCKayWA 72brPn3Q3i+5FzyTGfS9JLdGJfHVk2FVChA3zbIm/01mkIJPPXyN2tp07kH1VCOO0gGa OHj2I9nq9kX83+sUzaYs2t7kxv8/NQjqK7e7ycjfsgUru1wuiKwns2pyBNFSSv21Qu/G tn8djLhwScv+zUcOgxUlMfbrYJjplK8fawxmK0+5JcjFxtP1aet5fZ3Rn42BPLKgEVGZ q4iSf2ATzcpmHU8omGjMk6R65hIXLu0y+w/yh6T3DFCecY0fpanOVavAHLiVsTWgU3Es hAVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=RrBp+8An; 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 h1-20020a170902748100b0019caa082cb5si16111510pll.399.2023.03.22.10.14.58; Wed, 22 Mar 2023 10:15:41 -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=RrBp+8An; 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 S231179AbjCVQ6O (ORCPT + 99 others); Wed, 22 Mar 2023 12:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230521AbjCVQ6K (ORCPT ); Wed, 22 Mar 2023 12:58:10 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8183216896 for ; Wed, 22 Mar 2023 09:58:09 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 6622F20009; Wed, 22 Mar 2023 16:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1679504288; 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=RrBp+8AnozFWRI7Ebsi2JnY9XFrK357oc/ZwHII6pBd62JgMCW013M2PDzhT4RQRAplu3P Ne1WDN/m2fyO7SVUV9rnFc+xP8PHUZJqImVsH6cVqrVkddneIcxTN1iyFh0LLzdYG9Nh20 R1HmBcHPFGIFMXEo23QKkfSPMdXDNOE4KrJ9QuflYgbv4WPHzk8DpVV8Zktk9Mwn4fDeCe qhmdZ2Uq2VqFAc4xglVe7rfrr3NMzCWAHqVaQROtIzQnAIaeRRAzNXVTHi/9TwuQYBM1d8 1zPbMMLXPsMPKsGS4hjtRL0gcHnWL5ecwDmSwQhMnq7HjkMfX6BlFsBwTK4Hjg== From: Miquel Raynal To: Srinivas Kandagatla , Greg Kroah-Hartman , Cc: Robert Marko , Luka Perkov , Thomas Petazzoni , Michael Walle , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Miquel Raynal Subject: [PATCH v2 2/4] nvmem: layouts: sl28vpd: Use module_nvmem_layout_driver() Date: Wed, 22 Mar 2023 17:58:02 +0100 Message-Id: <20230322165804.2240285-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322165804.2240285-1-miquel.raynal@bootlin.com> References: <20230322165804.2240285-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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?1761088993372170432?= X-GMAIL-MSGID: =?utf-8?q?1761088993372170432?= 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 ");