All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Lee Jones <lee.jones@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] pwm: sl28cpld: fix getting driver data in pwm callbacks
Date: Tue, 24 Nov 2020 23:22:33 +0100	[thread overview]
Message-ID: <e92a3e855332b8e5fd6698a77852f758@walle.cc> (raw)
In-Reply-To: <20201124212432.3117322-1-u.kleine-koenig@pengutronix.de>

Am 2020-11-24 22:24, schrieb Uwe Kleine-König:
> Currently .get_state() and .apply() use dev_get_drvdata() on the struct
> device related to the pwm chip. This only works after .probe() called
> platform_set_drvdata() which in this driver happens only after
> pwmchip_add() and so comes possibly too late.
> 
> Instead of setting the driver data earlier use the traditional
> container_of approach as this way the driver data is conceptually and
> computational nearer.
> 
> Fixes: 9db33d221efc ("pwm: Add support for sl28cpld PWM controller")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

I wasn't able to reproduce the original bug, it seems it is really
timing/kernel/kernel config dependent. Thus I could only test if it
still working and could not verify that the original bug is fixed.
Nonetheless:

Tested-by: Michael Walle <michael@walle.cc>


Btw. the backtrace is available here:
   https://lavalab.kontron.com/scheduler/job/108#L950

-michael

  reply	other threads:[~2020-11-24 22:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 21:24 Uwe Kleine-König
2020-11-24 22:22 ` Michael Walle [this message]
2020-11-25  6:48   ` Uwe Kleine-König
2020-11-30  8:17 ` Michael Walle
2020-11-30 14:58   ` 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=e92a3e855332b8e5fd6698a77852f758@walle.cc \
    --to=michael@walle.cc \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --subject='Re: [PATCH] pwm: sl28cpld: fix getting driver data in pwm callbacks' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.