linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Kukjin Kim <kgene@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	"moderated list:SAMSUNG SOC CLOCK DRIVERS" 
	<linux-samsung-soc@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"open list:COMMON CLK FRAMEWORK" <linux-clk@vger.kernel.org>
Subject: Re: [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect
Date: Tue, 15 Oct 2019 23:52:39 +0900	[thread overview]
Message-ID: <CA+Ln22HJmVwC1r+SuWG6RgFLCtsG6TPzQK_t8rUtB=SsZ0LyhA@mail.gmail.com> (raw)
In-Reply-To: <20191010203043.1241612-1-arnd@arndb.de>

Hi Arnd,

2019年10月11日(金) 5:30 Arnd Bergmann <arnd@arndb.de>:
>
> The clk driver uses both a function call into an exported
> platform file and a direct register access to a hardcoded
> virtual address for accessing the MISCCR register, both
> become are a problem for a multiplatform kernel because
> of the header file dependency.
>
> Make this an indirect function call through platform data
> instead.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  arch/arm/mach-s3c24xx/common.c         |  3 +++
>  drivers/clk/samsung/clk-s3c2410-dclk.c | 10 ++++------
>  2 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c
> index 3dc029c2d2cb..ebf6bde67816 100644
> --- a/arch/arm/mach-s3c24xx/common.c
> +++ b/arch/arm/mach-s3c24xx/common.c
> @@ -667,5 +667,8 @@ struct platform_device s3c2410_device_dclk = {
>         .id             = 0,
>         .num_resources  = ARRAY_SIZE(s3c2410_dclk_resource),
>         .resource       = s3c2410_dclk_resource,
> +       .dev            = {
> +               .platform_data = s3c2410_modify_misccr,

Thanks for the patch!

Just one minor nit: It doesn't look very nice to pass a function
pointer directly as platform data. Could we have a struct defined
instead - with a kerneldoc comment describing the function pointer
field?

Best regards,
Tomasz

  reply	other threads:[~2019-10-15 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 20:28 [PATCH 00/36] ARM: samsung platform cleanup Arnd Bergmann
2019-10-10 20:29 ` [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect Arnd Bergmann
2019-10-15 14:52   ` Tomasz Figa [this message]
2019-10-23 13:10 ` [PATCH 00/36] ARM: samsung platform cleanup Krzysztof Kozlowski
2019-10-23 13:39   ` Arnd Bergmann

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='CA+Ln22HJmVwC1r+SuWG6RgFLCtsG6TPzQK_t8rUtB=SsZ0LyhA@mail.gmail.com' \
    --to=tomasz.figa@gmail.com \
    --cc=arnd@arndb.de \
    --cc=cw00.choi@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.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;
as well as URLs for NNTP newsgroup(s).