Re: [PATCH 01/36] ARM: samsung: make S3C24XX_MISCCR access indirect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arnd,

2019年10月11日(金) 5:30 Arnd Bergmann <arnd@xxxxxxxx>:
>
> 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@xxxxxxxx>
> ---
>  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




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux