mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
simplefb: Remove impossible check for of_clk_get_parent_count() < 0
The check for < 0 is impossible now that of_clk_get_parent_count() returns an unsigned int. Simplify the code and update the types. Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: <linux-fbdev@vger.kernel.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
3d755dcc20
commit
2cd82d06e4
@ -174,7 +174,7 @@ static int simplefb_parse_pd(struct platform_device *pdev,
|
|||||||
struct simplefb_par {
|
struct simplefb_par {
|
||||||
u32 palette[PSEUDO_PALETTE_SIZE];
|
u32 palette[PSEUDO_PALETTE_SIZE];
|
||||||
#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
|
#if defined CONFIG_OF && defined CONFIG_COMMON_CLK
|
||||||
int clk_count;
|
unsigned int clk_count;
|
||||||
struct clk **clks;
|
struct clk **clks;
|
||||||
#endif
|
#endif
|
||||||
#if defined CONFIG_OF && defined CONFIG_REGULATOR
|
#if defined CONFIG_OF && defined CONFIG_REGULATOR
|
||||||
@ -213,7 +213,7 @@ static int simplefb_clocks_init(struct simplefb_par *par,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
par->clk_count = of_clk_get_parent_count(np);
|
par->clk_count = of_clk_get_parent_count(np);
|
||||||
if (par->clk_count <= 0)
|
if (!par->clk_count)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
par->clks = kcalloc(par->clk_count, sizeof(struct clk *), GFP_KERNEL);
|
par->clks = kcalloc(par->clk_count, sizeof(struct clk *), GFP_KERNEL);
|
||||||
|
Loading…
Reference in New Issue
Block a user