From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20EDAC04A6A for ; Wed, 9 Aug 2023 12:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230446AbjHIMaS convert rfc822-to-8bit (ORCPT ); Wed, 9 Aug 2023 08:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbjHIMaR (ORCPT ); Wed, 9 Aug 2023 08:30:17 -0400 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96AE910F3; Wed, 9 Aug 2023 05:30:14 -0700 (PDT) Received: from [194.95.143.137] (helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qTiJH-00071M-LR; Wed, 09 Aug 2023 14:29:07 +0200 From: Heiko Stuebner To: Thierry Reding , Laurent Pinchart , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Douglas Anderson , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Pavel Machek , Lee Jones , Hector Martin , Sven Peter , Alyssa Rosenzweig , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Ray Jui , Scott Branden , Broadcom internal kernel review list , Florian Fainelli , Alexander Shiyan , Benson Leung , Guenter Roeck , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Paul Cercueil , Vladimir Zapolskiy , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Conor Dooley , Daire McNamara , Matthias Brugger , AngeloGioacchino Del Regno , Jonathan =?ISO-8859-1?Q?Neusch=E4fer?= , Krzysztof Kozlowski , Alim Akhtar , Palmer Dabbelt , Paul Walmsley , Michael Walle , Orson Zhai , Baolin Wang , Chunyan Zhang , Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Samuel Holland , Hammer Hsieh , Jonathan Hunter , Nobuhiro Iwamatsu , Sean Anderson , Michal Simek , Johan Hovold , Alex Elder , Greg Kroah-Hartman , Anjelique Melendez , Dmitry Baryshkov , Luca Weiss , Bjorn Andersson , linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, linux-mips@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-riscv@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev Subject: Re: [PATCH v2 1/2] pwm: Manage owner assignment implicitly for drivers Date: Wed, 09 Aug 2023 14:29:04 +0200 Message-ID: <5316381.7s5MMGUR32@phil> In-Reply-To: <20230804142707.412137-2-u.kleine-koenig@pengutronix.de> References: <20230804142707.412137-1-u.kleine-koenig@pengutronix.de> <20230804142707.412137-2-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Am Freitag, 4. August 2023, 16:27:06 CEST schrieb Uwe Kleine-König: > Instead of requiring each driver to care for assigning the owner member > of struct pwm_ops, handle that implicitly using a macro. Note that the > owner member has to be moved to struct pwm_chip, as the ops structure > usually lives in read-only memory and so cannot be modified. > > The upside is that new lowlevel drivers cannot forget the assignment and > save one line each. The pwm-crc driver didn't assign .owner, that's not > a problem in practise though as the driver cannot be compiled as a > module. > > Signed-off-by: Uwe Kleine-König > --- > drivers/pwm/pwm-rockchip.c | 1 - Acked-by: Heiko Stuebner #pwm-rockchip