Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1313362rdb; Wed, 6 Dec 2023 15:18:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDpSQsSf/qyaQyPkvFfF28i54e/jI7t6TQEhCB5JYOqhMV3PqkDrh/WOLjjuXXl65CUpS0 X-Received: by 2002:a17:90b:310b:b0:286:bff2:c41b with SMTP id gc11-20020a17090b310b00b00286bff2c41bmr1586744pjb.23.1701904694302; Wed, 06 Dec 2023 15:18:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701904694; cv=none; d=google.com; s=arc-20160816; b=p04OZEZXCvDU+fQnz6BSPjgj9/426vwX4zReaDYGhhSsHvPaQSuHd4ujKr7DJFVtJm jr1WzJnYfb0ytKNRpnFKBk0Asn1lVw2V+DQboYnNim5C4S8jbqMIJrEyETVwogChMWZ/ 9mNAjp0zbC1dNQ1lipaezBR2yBMqDdYtcuq4IjBZoHEj/2D/39pUylO867drUX8JEzim voOpLdodBRMJFPr+gmGf7NzWJ+cjjqkjPjzpJGwBHRsykBwb1GLh6AehFIMjZIkH/DT7 6ZlwvlkOxqGaJAtAJQDpVVOHV6u3u1DxxDKzYNhAGd07K8Iz8m5mprJkWk1F1Dsv7Ri7 9d7A== 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=0QHAq2TCBs9YRpG8R3zH1wbBe0gsNCocueqladz7Vd8=; fh=G6Hp1tEbdXsoLeWD0Yc7Z9n/scIRldNp9qabfZjjMx0=; b=mrWy6wlu+eVZY8wfP+O8boDQii0KZP6eMuADW7DfMN/nEBk6GkJGB3l+Ngn5AEGYy2 k6q1nwGsWSL7ybaDTrKxT6CJjCbp/NUCRs4SOy6zA6t8V6XKLBa8EbZDNgoA6yjsILNg jnJ50DzuLOzAFj4OTIa4AGv7tJamdCowepE5hdb675KM/+cjGBvrJfADt5y8kNlLf57e QFCO9N8SRdm8rvgQoaln/fFlckc9Pax5YucD6feaNZFNYKZaQ9A4Oeki0gSRees7S/VA YXaXVBxf8nGaxghgS0dxkZUk0uJqD2Fu28mdtrrSVwkNKzg2TnHIWnVNShBb3TTVrCKx UA0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HtlXVGsX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id lp15-20020a17090b4a8f00b00286864c9cdcsi575830pjb.125.2023.12.06.15.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 15:18:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HtlXVGsX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 077F382F2C52; Wed, 6 Dec 2023 15:18:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379685AbjLFXRl (ORCPT + 99 others); Wed, 6 Dec 2023 18:17:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbjLFXRb (ORCPT ); Wed, 6 Dec 2023 18:17:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5786F181 for ; Wed, 6 Dec 2023 15:17:37 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95DC0C433CD; Wed, 6 Dec 2023 23:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701904656; bh=6JfBdb+tpPHhDepnCfkjAjsjvnC4Fs4rfNHqqamKfJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HtlXVGsXz2TXYLBoQPOAOPi787gCgqWL0dRemgzUi9stC6047e0TTgEULxWGYZ7f0 iaiqNBG6FrMll4RjwFeMNXFdUTGAnToZWWVgrPXsF9yxR4n2Sp9sOAGD+aFo9hrHHc cu+HbZQvyeOA0YfIZDgHO1kqdXGKTucbZW4CA5X2qKNvC5sEM/lYeJR5rzIuB9l4Aq PiZkf9wm+IHPtUxkjlqgzLFiqykvibjO2aRGqavaMr5PmTnKR/p4BqE09aEXUj04DC WvdjFe05QBGozxmRaGgdFq0Kucz0ciJD6x7X3Q6QVMerITsNgRlpiJ+6yLDkmHwmWK i6HfCK2B3bwvg== From: Stephen Boyd To: Greg Kroah-Hartman Cc: Fei Shao , linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: [PATCH 6/8] spmi: hisi-spmi-controller: Use devm_spmi_controller_add() Date: Wed, 6 Dec 2023 15:17:29 -0800 Message-ID: <20231206231733.4031901-7-sboyd@kernel.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog In-Reply-To: <20231206231733.4031901-1-sboyd@kernel.org> References: <20231206231733.4031901-1-sboyd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 06 Dec 2023 15:18:12 -0800 (PST) From: Fei Shao Convert to the device-managed version of spmi_controller_add() and delete the unnecessary driver remove callback. Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20230824104101.4083400-5-fshao@chromium.org Signed-off-by: Stephen Boyd --- drivers/spmi/hisi-spmi-controller.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/spmi/hisi-spmi-controller.c b/drivers/spmi/hisi-spmi-controller.c index a5525902656a..674a350cc676 100644 --- a/drivers/spmi/hisi-spmi-controller.c +++ b/drivers/spmi/hisi-spmi-controller.c @@ -308,7 +308,7 @@ static int spmi_controller_probe(struct platform_device *pdev) ctrl->read_cmd = spmi_read_cmd; ctrl->write_cmd = spmi_write_cmd; - ret = spmi_controller_add(ctrl); + ret = devm_spmi_controller_add(&pdev->dev, ctrl); if (ret) { dev_err(&pdev->dev, "spmi_controller_add failed with error %d!\n", ret); return ret; @@ -317,13 +317,6 @@ static int spmi_controller_probe(struct platform_device *pdev) return 0; } -static void spmi_del_controller(struct platform_device *pdev) -{ - struct spmi_controller *ctrl = platform_get_drvdata(pdev); - - spmi_controller_remove(ctrl); -} - static const struct of_device_id spmi_controller_match_table[] = { { .compatible = "hisilicon,kirin970-spmi-controller", @@ -334,7 +327,6 @@ MODULE_DEVICE_TABLE(of, spmi_controller_match_table); static struct platform_driver spmi_controller_driver = { .probe = spmi_controller_probe, - .remove_new = spmi_del_controller, .driver = { .name = "hisi_spmi_controller", .of_match_table = spmi_controller_match_table, -- https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/ https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git