From a8321393309ec73265f6fc982c088ff4d393e3c7 Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Fri, 21 Sep 2012 08:04:45 +0900 Subject: ARM: SAMSUNG: Fix HDMI related warnings Silences the following warnings: arch/arm/plat-samsung/devs.c:765:31: warning: symbol 's5p_hdmi_def_platdata' was not declared. Should it be static? arch/arm/plat-samsung/devs.c:767:13: warning: symbol 's5p_hdmi_set_platdata' was not declared. Should it be static? Signed-off-by: Sachin Kamat Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/devs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index fc49f3dabd76..03af0420e20f 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -763,7 +764,7 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd) &s5p_device_i2c_hdmiphy); } -struct s5p_hdmi_platform_data s5p_hdmi_def_platdata; +static struct s5p_hdmi_platform_data s5p_hdmi_def_platdata; void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info, struct i2c_board_info *mhl_info, int mhl_bus) -- cgit v1.2.1 From 13acc291191281e2980e56dbe3a3d80ce677c9a8 Mon Sep 17 00:00:00 2001 From: Chander Kashyap Date: Fri, 21 Sep 2012 11:08:32 +0900 Subject: ARM: SAMSUNG: Add check for NULL in clock interface The clock instance parameter in Samsung clock interface is not being checked for NULL pointers. Add checks for NULL pointers. Signed-off-by: Chander Kashyap Acked-by: Thomas Abraham Signed-off-by: Kukjin Kim --- arch/arm/plat-samsung/clock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/plat-samsung') diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c index 65c5eca475e7..7938fbce825e 100644 --- a/arch/arm/plat-samsung/clock.c +++ b/arch/arm/plat-samsung/clock.c @@ -119,7 +119,7 @@ void clk_disable(struct clk *clk) unsigned long clk_get_rate(struct clk *clk) { - if (IS_ERR(clk)) + if (IS_ERR_OR_NULL(clk)) return 0; if (clk->rate != 0) @@ -136,7 +136,7 @@ unsigned long clk_get_rate(struct clk *clk) long clk_round_rate(struct clk *clk, unsigned long rate) { - if (!IS_ERR(clk) && clk->ops && clk->ops->round_rate) + if (!IS_ERR_OR_NULL(clk) && clk->ops && clk->ops->round_rate) return (clk->ops->round_rate)(clk, rate); return rate; @@ -146,7 +146,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate) { int ret; - if (IS_ERR(clk)) + if (IS_ERR_OR_NULL(clk)) return -EINVAL; /* We do not default just do a clk->rate = rate as @@ -175,7 +175,7 @@ int clk_set_parent(struct clk *clk, struct clk *parent) { int ret = 0; - if (IS_ERR(clk)) + if (IS_ERR_OR_NULL(clk) || IS_ERR_OR_NULL(parent)) return -EINVAL; spin_lock(&clocks_lock); -- cgit v1.2.1