mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
Add missing sentinel, check return value and mark rtc-32k as critical
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCYmbhHQAKCRB0Ba7+DO8k k8SmAQCBkcf7bJFtZkyvWqHIef++ZDwy3ENKb/WL30bMFcl25AD8Cx+nPY/zOvtd vKdDkxjbtvPmq0CsSRqAzifFBoCpVAk= =R+yl -----END PGP SIGNATURE----- Merge tag 'sunxi-clk-fixes-for-5.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes Pull Allwinner clk fixes from Jernej Skrabec: - Add missing sentinel - check return value for platform_get_resource() - mark rtc-32k as critical * tag 'sunxi-clk-fixes-for-5.18-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() clk: sunxi-ng: sun6i-rtc: Mark rtc-32k as critical clk: sunxi-ng: fix not NULL terminated coccicheck error
This commit is contained in:
commit
a91b05f6b9
@ -241,6 +241,7 @@ static struct clk_init_data rtc_32k_init_data = {
|
|||||||
.ops = &ccu_mux_ops,
|
.ops = &ccu_mux_ops,
|
||||||
.parent_hws = rtc_32k_parents,
|
.parent_hws = rtc_32k_parents,
|
||||||
.num_parents = ARRAY_SIZE(rtc_32k_parents), /* updated during probe */
|
.num_parents = ARRAY_SIZE(rtc_32k_parents), /* updated during probe */
|
||||||
|
.flags = CLK_IS_CRITICAL,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ccu_mux rtc_32k_clk = {
|
static struct ccu_mux rtc_32k_clk = {
|
||||||
@ -346,6 +347,7 @@ static const struct of_device_id sun6i_rtc_ccu_match[] = {
|
|||||||
.compatible = "allwinner,sun50i-r329-rtc",
|
.compatible = "allwinner,sun50i-r329-rtc",
|
||||||
.data = &sun50i_r329_rtc_ccu_data,
|
.data = &sun50i_r329_rtc_ccu_data,
|
||||||
},
|
},
|
||||||
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
|
int sun6i_rtc_ccu_probe(struct device *dev, void __iomem *reg)
|
||||||
|
@ -109,6 +109,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
|
|||||||
spin_lock_init(&data->lock);
|
spin_lock_init(&data->lock);
|
||||||
|
|
||||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
|
if (!r)
|
||||||
|
return -EINVAL;
|
||||||
/* one clock/reset pair per word */
|
/* one clock/reset pair per word */
|
||||||
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
|
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
|
||||||
data->membase = devm_ioremap_resource(&pdev->dev, r);
|
data->membase = devm_ioremap_resource(&pdev->dev, r);
|
||||||
|
Loading…
Reference in New Issue
Block a user