From patchwork Thu Jan 26 13:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 48652 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp275462wrn; Thu, 26 Jan 2023 05:42:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXusT0O5UoeobNUXBGKO6zs3BsG7//4Oj2jyzp5JjhLR+T39rg7ZJayAD2RT027XwaAZlSLg X-Received: by 2002:aa7:cc98:0:b0:486:ecd3:15f8 with SMTP id p24-20020aa7cc98000000b00486ecd315f8mr36489285edt.6.1674740576306; Thu, 26 Jan 2023 05:42:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674740576; cv=none; d=google.com; s=arc-20160816; b=hBfEPUXeQsS7/lrYw52iVXdH4gWEt2ttyhGphVDmH4kEYr3ZalxYGWRNNptAa+PNa1 QB/0slO1kUVWl8A8Jc+6NgNzfhgIOtZFsLPvYT4AmjOeGEqKUUYQGIeLxyI0QivVbsGx d/HHBfmPXDSfB9mFILupKx5ARfiJxg92+yUQXljAqXgzkUq3yLr1iRE2dZ4BgKwA+car RetdYnvtp5zZt3z/PmsNz/HWsDcS656J4HwIGdTaBb4Cy4Q5+2YzPHclonjbGsljhBHz JO7ZoQ6ActVmsC8YB5e0wvM5D9yFPlBI99d6Rl4/vL5uX+4kwbB71ze5CyhNQ3rNnF4r ZD4w== 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=UbCn8p+JZW4cbcQJgy7TzXOMR0j0n/riVghhy0A9Nbs=; b=Te+jlyntErdGAQQDU7a01f0wfDd1PuZkpgmwaAlXgs+iQ3qbPwjLFTo6iIWj9JHtQZ codiwWL5GCojxOJT3hPy3Jiw20GaEyy8OBW7UQ03dxXQk2d2vuiKNDSLnQ3mt7j+nelW yZ0J1nSVIBRMu8MVkKEp7AG2ywalhHc9AipOUM+WygTuxEHD99wyCktpNNgRWKBuXocZ 0+Au4r0MndgTxGZi9n3a1XklBfxFD2jcL996EoFc40uugA260+xrnIPHscpBTsC3jCHM eojVJHmNMdQ1/Thno3iRUPpjlXaZpku1WSwft8x4JGOBIemIoVeBm+k8YUjLHLWey07F I/Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AYu3+Y4X; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h32-20020a0564020ea000b0049ff06fc978si1735603eda.534.2023.01.26.05.42.32; Thu, 26 Jan 2023 05:42:56 -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=@kernel.org header.s=k20201202 header.b=AYu3+Y4X; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236982AbjAZNcm (ORCPT + 99 others); Thu, 26 Jan 2023 08:32:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236930AbjAZNcg (ORCPT ); Thu, 26 Jan 2023 08:32:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 117E16E84; Thu, 26 Jan 2023 05:32:35 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8D34C617EE; Thu, 26 Jan 2023 13:32:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0AFCC4339C; Thu, 26 Jan 2023 13:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674739953; bh=enToiuVABhYJILMxyVw7rFjKmf1TrVq1GFiY2ZMkd6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AYu3+Y4XIEErQXOh0EUi/03Fp6rirwhyn9NmKELQh+bLBssgwwSE9Mc1QIbkwkY94 NPVkMG121PccSZIbd7IHlMYY+n2nMabgI+uBdDf2Pn/PAUm5uskxta9IVtm6SdL75Z Pp2ZNeHMUD2KD8NRrirQdL7EmMv4Gte9twXH7XcExO65K7pU52OwuMQWMBQz8JfejI 4Dt9CpulCHuhRbRBh4GJXZKhG+ZpOyyp7DVfeOB4WQnDUU6okiVhuyP/4yn0zwDYCG t9FGWd08Q7l87n+FlATApKVJFyEa7esoE3Whb0n+agSsuA6+4JQc0ZlCL6joJTs0E7 7lLKyMcXL4SHw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pL2Mq-0007Ak-GU; Thu, 26 Jan 2023 14:32:40 +0100 From: Johan Hovold To: Srinivas Kandagatla Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 1/2] nvmem: qcom-spmi-sdam: fix module autoloading Date: Thu, 26 Jan 2023 14:30:33 +0100 Message-Id: <20230126133034.27491-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230126133034.27491-1-johan+linaro@kernel.org> References: <20230126133034.27491-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1756092756511640260?= X-GMAIL-MSGID: =?utf-8?q?1756092774657232501?= Add the missing module device table so that the driver can be autoloaded when built as a module. Fixes: 40ce9798794f ("nvmem: add QTI SDAM driver") Cc: stable@vger.kernel.org # 5.6 Signed-off-by: Johan Hovold --- drivers/nvmem/qcom-spmi-sdam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c index 4fcb63507ecd..8499892044b7 100644 --- a/drivers/nvmem/qcom-spmi-sdam.c +++ b/drivers/nvmem/qcom-spmi-sdam.c @@ -166,6 +166,7 @@ static const struct of_device_id sdam_match_table[] = { { .compatible = "qcom,spmi-sdam" }, {}, }; +MODULE_DEVICE_TABLE(of, sdam_match_table); static struct platform_driver sdam_driver = { .driver = { From patchwork Thu Jan 26 13:30:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 48653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp275551wrn; Thu, 26 Jan 2023 05:43:04 -0800 (PST) X-Google-Smtp-Source: AK7set+DMicj48ZELQdkMU2Xm804pzbXFnZN/xTiePUHiXCyeN2Bg3hfTN9aetOx8poMxOi/8XoT X-Received: by 2002:a17:902:e891:b0:196:d0a:fa4c with SMTP id w17-20020a170902e89100b001960d0afa4cmr13165913plg.56.1674740584509; Thu, 26 Jan 2023 05:43:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674740584; cv=none; d=google.com; s=arc-20160816; b=Ggriiz5M4BhzPZUxOn/sBlCzn2YlH3+tWTtUktGN55WKpV+frzUvf4LzuYCbqbLevF gRz9vpxBXs/kX+CdfVHwtjaWvhuberbLxhnykLEjLgzsan/kEswHCgqaDjSxI97cECjK oyr9FlXb9Xr9gR4UNjE2D1zmHWIGDRjFe8TIc77rkPl7M16ng/ck4gU2KbZ07p0YcP2p G/tO8/JiC2vM3/xpMTJStJy1FqibMUN3aeMnUcAfNmngxvUNE1V/uFbMtAfdphq2+mh/ PgjS4Zbfa3gQcrAznsPY5pvgEUtsn7DHkEwMz5hdMYYsJkoOzmc6uGIPtdyWRmyaT8Hb FCNg== 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=SR5Fm1Zu2OkoBnqTxAN4/L0QNa4aiRb6J6A9nGBChpw=; b=eOJDxCFkD53YwLggRPFt8Yinn9kluiZZXllzMkk7PeS3U5Qq/A/Dt2gnrT9iUE2Lc3 m3lLo8mwJES9TzlH/D5Mlo3AsK19aeoAeZUMGV3+dhFFpsxY11+/tp3kstmBo1O1gRdn JMCkS9EV6COibmPcpfCJJfURfVeT0fCAMpo3/UteAqbqylWnD2YNK+QWCRm/Rnb8saVE +GAMF3BqujIYmnr2Jgz3NEiTIAAIrKn5FTUoy/LGtTX+CcWJLjIB95BmR5SF1lX9LTbk SwcPo6ki/HfTF+DTB8aHnhjelq4drVS6O1DESeFS1ZES21LDQfXz9wPVcNenSSIue9rM ESzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=M7UEr3UL; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020aa7968d000000b00572899f993fsi1179593pfk.306.2023.01.26.05.42.52; Thu, 26 Jan 2023 05:43:04 -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=@kernel.org header.s=k20201202 header.b=M7UEr3UL; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236857AbjAZNck (ORCPT + 99 others); Thu, 26 Jan 2023 08:32:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236013AbjAZNcg (ORCPT ); Thu, 26 Jan 2023 08:32:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEF5A6A57; Thu, 26 Jan 2023 05:32:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91D5D617E8; Thu, 26 Jan 2023 13:32:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2B4DC4339E; Thu, 26 Jan 2023 13:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674739953; bh=cdNLMB2rZ4rnBWr3OLqzMglKfyiP3lv+egE4gKxG97I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M7UEr3ULHzc9Ny5bGEc9BSFwje4IIdaVZv8q8faWKEHtafv8nLQHORkoq/ltNflgq uR/ikpZv/FVLwd8BTUHP/MqJyyV4Ofc46nQLwX177CKpJnnddnpgyItJezzTloW0m9 D4RA74ngVihRHIvqMdLWEnmwbEcC8j5r6Dg4ZCKkwuQi+sOdUAWqq+Ke8u2WR8GuHt uUFF6rw6K6FjvLSwpwKaxv9fg81fPHeJ4jcJrWq4UMXINA1+Re4Q+humshUMj+ARVr IZ92vOxuTr+ewuIduHdeAACggjAsLSPYYFx2jBL3wVMHyNW0//aY1HaFJFWJsoLb31 3Ne8AKr5KUXzg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pL2Mq-0007Am-Iy; Thu, 26 Jan 2023 14:32:40 +0100 From: Johan Hovold To: Srinivas Kandagatla Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Greg Kroah-Hartman , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/2] nvmem: qcom-spmi-sdam: register at device init time Date: Thu, 26 Jan 2023 14:30:34 +0100 Message-Id: <20230126133034.27491-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230126133034.27491-1-johan+linaro@kernel.org> References: <20230126133034.27491-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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?1756092783558718146?= X-GMAIL-MSGID: =?utf-8?q?1756092783558718146?= There are currently no in-tree users of the Qualcomm SDAM nvmem driver and there is generally no point in registering a driver that can be built as a module at subsys init time. Register the driver at the normal device init time instead and let driver core sort out the probe order. Signed-off-by: Johan Hovold --- drivers/nvmem/qcom-spmi-sdam.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/nvmem/qcom-spmi-sdam.c b/drivers/nvmem/qcom-spmi-sdam.c index 8499892044b7..f822790db49e 100644 --- a/drivers/nvmem/qcom-spmi-sdam.c +++ b/drivers/nvmem/qcom-spmi-sdam.c @@ -175,18 +175,7 @@ static struct platform_driver sdam_driver = { }, .probe = sdam_probe, }; - -static int __init sdam_init(void) -{ - return platform_driver_register(&sdam_driver); -} -subsys_initcall(sdam_init); - -static void __exit sdam_exit(void) -{ - return platform_driver_unregister(&sdam_driver); -} -module_exit(sdam_exit); +module_platform_driver(sdam_driver); MODULE_DESCRIPTION("QCOM SPMI SDAM driver"); MODULE_LICENSE("GPL v2");