Skip to content

Commit 7458ea3

Browse files
committed
Merge tag 'sunxi-clk-for-6.6-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner
Pull Allwinner clk driver updates from Jernej Skrabec: - Convert sun9i-mmc clock to use devm_platform_get_and_ioremap_resource() - Fix function name in a comment in ccu_mmc_timing.c * tag 'sunxi-clk-for-6.6-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: Modify mismatched function name clk: sunxi: sun9i-mmc: Use devm_platform_get_and_ioremap_resource()
2 parents 06c2afb + 075d9ca commit 7458ea3

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

drivers/clk/sunxi-ng/ccu_mmc_timing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int sunxi_ccu_set_mmc_timing_mode(struct clk *clk, bool new_mode)
4343
EXPORT_SYMBOL_GPL(sunxi_ccu_set_mmc_timing_mode);
4444

4545
/**
46-
* sunxi_ccu_set_mmc_timing_mode: Get the current MMC clock timing mode
46+
* sunxi_ccu_get_mmc_timing_mode: Get the current MMC clock timing mode
4747
* @clk: clock to query
4848
*
4949
* Return: %0 if the clock is in old timing mode, > %0 if it is in

drivers/clk/sunxi/clk-sun9i-mmc.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,13 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
108108

109109
spin_lock_init(&data->lock);
110110

111-
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
112-
if (!r)
113-
return -EINVAL;
114-
/* one clock/reset pair per word */
115-
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
116-
data->membase = devm_ioremap_resource(&pdev->dev, r);
111+
data->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
117112
if (IS_ERR(data->membase))
118113
return PTR_ERR(data->membase);
119114

115+
/* one clock/reset pair per word */
116+
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
117+
120118
clk_data = &data->clk_data;
121119
clk_data->clk_num = count;
122120
clk_data->clks = devm_kcalloc(&pdev->dev, count, sizeof(struct clk *),

0 commit comments

Comments
 (0)