ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: "Jernej Škrabec" <jernej.skrabec@gmail.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Samuel Holland" <samuel@sholland.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, kernel@pengutronix.de
Subject: Re: [PATCH v3 030/108] pwm: sun4i: Make use of pwmchip_parent() macro
Date: Sat, 25 Nov 2023 19:48:35 +0100	[thread overview]
Message-ID: <2706375.mvXUDI8C0e@jernej-laptop> (raw)
In-Reply-To: <20231121134901.208535-31-u.kleine-koenig@pengutronix.de>

Dne torek, 21. november 2023 ob 14:49:32 CET je Uwe Kleine-König napisal(a):
> struct pwm_chip::dev is about to change. To not have to touch this
> driver in the same commit as struct pwm_chip::dev, use the macro
> provided for exactly this purpose.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/pwm/pwm-sun4i.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
> index 1a439025540d..44edf1ce5739 100644
> --- a/drivers/pwm/pwm-sun4i.c
> +++ b/drivers/pwm/pwm-sun4i.c
> @@ -245,7 +245,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
>  	if (!cstate.enabled) {
>  		ret = clk_prepare_enable(sun4i_pwm->clk);
>  		if (ret) {
> -			dev_err(chip->dev, "failed to enable PWM clock\n");
> +			dev_err(pwmchip_parent(chip), "failed to enable PWM clock\n");
>  			return ret;
>  		}
>  	}
> @@ -253,7 +253,7 @@ static int sun4i_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
>  	ret = sun4i_pwm_calculate(sun4i_pwm, state, &duty, &period, &prescaler,
>  				  &bypass);
>  	if (ret) {
> -		dev_err(chip->dev, "period exceeds the maximum value\n");
> +		dev_err(pwmchip_parent(chip), "period exceeds the maximum value\n");
>  		if (!cstate.enabled)
>  			clk_disable_unprepare(sun4i_pwm->clk);
>  		return ret;
> 





  reply	other threads:[~2023-11-25 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 13:49 [PATCH v3 000/108] pwm: Fix lifetime issues for pwm_chips Uwe Kleine-König
2023-11-21 13:49 ` [PATCH v3 030/108] pwm: sun4i: Make use of pwmchip_parent() macro Uwe Kleine-König
2023-11-25 18:48   ` Jernej Škrabec [this message]
2023-11-21 13:50 ` [PATCH v3 091/108] pwm: sun4i: Make use of devm_pwmchip_alloc() function Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2706375.mvXUDI8C0e@jernej-laptop \
    --to=jernej.skrabec@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=samuel@sholland.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox