From patchwork Tue Oct 25 14:03:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10810 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1029587wru; Tue, 25 Oct 2022 07:09:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Kai1RcLuoDY1gUlnNb0mKe5Z6dBZZbMGI7o91qQxNvXpx1oOTvxu2kkjYPmRSy0MixM8D X-Received: by 2002:a17:902:ec86:b0:185:483e:e4ec with SMTP id x6-20020a170902ec8600b00185483ee4ecmr39216797plg.164.1666706997555; Tue, 25 Oct 2022 07:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666706997; cv=none; d=google.com; s=arc-20160816; b=UzGKLU+BhxbYkeWJ4TSwynqPKHaWRAdJsdDo6AfWIdo92/kGYjxBQ0/if5QHe4E5aO z39u6CvuejJRZqpb2Suei9zL056sZhUZBRUhpQ/Zt540fXP8MIvqbZMqfMzgNNUOEubn kBjGWSBljDveSQQxzyFOn2MYFnrHE+vLQsZcpZNTyRj1xU4SgSZM8l5kQNarM1nicUOU o7BewrdOLFlU/z6rx2NjpO6UB7+rXGt4omIX8P8cVMPHfZPbJq9dAnklC7q0TzCV7J74 4OYQZ1Wbz3VXNfBvwST3axgOwFFubF3JpNkxa2fHUP8+CRLMX4Bnc42tmxuUZ/ZNQf5Y s9DQ== 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 :message-id:date:subject:cc:to:from; bh=Vevq2XZppOuZdLEidBLZJre7pnMfKYi92FqUkVQjTR0=; b=Nt/vYrjwkgXTQYxFuBOBasKRrCuvfRvi58zU7MicXm5Myfy4LX7XvPCyNOFGj8aLnG djcMCkEYQaQ3Xy8HP2Z2nnOHnKKmduiDxndyo3jQojhHmCwAbQRWlPSemqZq/cA9phT4 8W5SJoC9XEetSGhC1vGAI1aEMxZLGPmupE0ASACVQC1BVnCeP+SNcc+yOxPMUoyQtHDX vSGO+i2BtyFkrT5IWb0pT+jI7jzaPl1TLZr5Iy9bl1ZpLLXxBj7Ai8Mi9g/mxLddu/Tu y5tpT/0f74Z8nPWpGOdFnqaAegLYJc3AdbDaM30CA5FQXFGocCNDJdNLQh/XthrXyOCo t03g== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d195-20020a6336cc000000b0046ec396db31si3042724pga.857.2022.10.25.07.09.27; Tue, 25 Oct 2022 07:09:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231795AbiJYOIL (ORCPT + 99 others); Tue, 25 Oct 2022 10:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232625AbiJYOH2 (ORCPT ); Tue, 25 Oct 2022 10:07:28 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA57017A03A for ; Tue, 25 Oct 2022 07:03:49 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:9dd:efb4:9ae5:d7b4]) by andre.telenet-ops.be with bizsmtp id cE3m2800S1HY1Pb01E3mMj; Tue, 25 Oct 2022 16:03:47 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1onKWw-001R1Q-Cp; Tue, 25 Oct 2022 16:03:46 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1onKWv-00ERYC-NG; Tue, 25 Oct 2022 16:03:45 +0200 From: Geert Uytterhoeven To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= Cc: Biju Das , linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] pwm: Add missing dummy for devm_pwmchip_add() Date: Tue, 25 Oct 2022 16:03:42 +0200 Message-Id: <12f2142991690d2b1d6890821f6e7779a4d4bdc0.1666706435.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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?1747668956700043972?= X-GMAIL-MSGID: =?utf-8?q?1747668956700043972?= The PWM subsystem supports compile-testing if CONFIG_PWM is disabled. However, no dummy is provided for devm_pwmchip_add(), which may lead to build failures. Fixes: bcda91bf86c1ff76 ("pwm: Add a device-managed function to add PWM chips") Signed-off-by: Geert Uytterhoeven --- include/linux/pwm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/pwm.h b/include/linux/pwm.h index d70c6e5a839d6902..bba492eea96c5552 100644 --- a/include/linux/pwm.h +++ b/include/linux/pwm.h @@ -478,6 +478,11 @@ static inline int pwmchip_remove(struct pwm_chip *chip) return -EINVAL; } +static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip) +{ + return -EINVAL; +} + static inline struct pwm_device *pwm_request_from_chip(struct pwm_chip *chip, unsigned int index, const char *label)