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 X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D4CC433DF for ; Fri, 5 Jun 2020 18:18:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44417207D3 for ; Fri, 5 Jun 2020 18:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=walle.cc header.i=@walle.cc header.b="vTxrPVq7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728092AbgFESSE (ORCPT ); Fri, 5 Jun 2020 14:18:04 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:35417 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbgFESSD (ORCPT ); Fri, 5 Jun 2020 14:18:03 -0400 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id CB0A122FEB; Fri, 5 Jun 2020 20:17:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1591381080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZQrvFc+JfRqJrBZHhTycEUPJ1czO+KGCEWzplfdwq6c=; b=vTxrPVq7pwVzE9K+7xVF8maUzd1Hx1QtGuBVG62RAkkKjnyiRqh+YnQ+r4CAiE/XqWFkXn jHE8MEGzEv3DgzZGP8Tonrvze71RaVmch6aNEnZwsBRYAEylZ3cCVe+s7C2uVzXtps72J8 0KLiMnUZz6+snc/Vk6MWgY9lmuzGKCY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 05 Jun 2020 20:17:59 +0200 From: Michael Walle To: Lee Jones Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linus Walleij , Bartosz Golaszewski , Rob Herring , Jean Delvare , Guenter Roeck , Thierry Reding , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier , Mark Brown , Greg Kroah-Hartman , Andy Shevchenko Subject: Re: [PATCH v4 05/11] pwm: add support for sl28cpld PWM controller In-Reply-To: <20200605084915.GE3714@dell> References: <20200604211039.12689-1-michael@walle.cc> <20200604211039.12689-6-michael@walle.cc> <20200605084915.GE3714@dell> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: michael@walle.cc Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Am 2020-06-05 10:49, schrieb Lee Jones: [..] >> +static inline struct sl28cpld_pwm *to_sl28cpld_pwm(struct pwm_chip >> *chip) >> +{ >> + return container_of(chip, struct sl28cpld_pwm, pwm_chip); >> +} > > Why not save yourself the trouble and just: > > struct sl28cpld_pwm *pwm = dev_get_drvdata(chip->dev); Is there a reason why not a single pwm driver uses something like that? -michael