diff options
| author | Krzysztof Kozlowski <[email protected]> | 2020-08-06 20:20:23 +0200 |
|---|---|---|
| committer | Krzysztof Kozlowski <[email protected]> | 2020-08-19 20:58:10 +0200 |
| commit | b84e23f5135103c45022b0e4a4ed2459d5398a7e (patch) | |
| tree | b41da5da053dc35944de8fec10c83468cbb13aa9 /include/linux/platform_data | |
| parent | 346f183cc1348cbf3814796afab0ea34475152a9 (diff) | |
ARM: s3c24xx: pass pointer to clk driver via platform data
Passing pointers directly as platform data is fragile and undocumented.
Better to create a platform data structure which explicitly documents
what is passed to the driver.
Suggested-by: Tomasz Figa <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/clk-s3c2410.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/platform_data/clk-s3c2410.h b/include/linux/platform_data/clk-s3c2410.h new file mode 100644 index 000000000000..7eb1cfa5409b --- /dev/null +++ b/include/linux/platform_data/clk-s3c2410.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2020 Krzysztof Kozlowski <[email protected]> + */ + +#ifndef __LINUX_PLATFORM_DATA_CLK_S3C2410_H_ +#define __LINUX_PLATFORM_DATA_CLK_S3C2410_H_ + +/** + * struct s3c2410_clk_platform_data - platform data for S3C2410 clock driver + * + * @modify_misccr: Function to modify the MISCCR and return the new value + */ +struct s3c2410_clk_platform_data { + unsigned int (*modify_misccr)(unsigned int clr, unsigned int chg); +}; + +#endif /* __LINUX_PLATFORM_DATA_CLK_S3C2410_H_ */ + |