Skip to content

Commit 2c30f97

Browse files
committed
Merge tag 'counter-fixes-for-7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus
William writes: Counter fixes for 7.2 A fix for microchip-tcb-capture to read the devicetree "reg" cell into a u32 variable to match the expected data type. * tag 'counter-fixes-for-7.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: microchip-tcb-capture: Fix DT channel validation
2 parents 6ffecfe + f1a3a99 commit 2c30f97

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/counter/microchip-tcb-capture.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ static int mchp_tc_probe(struct platform_device *pdev)
483483
char clk_name[7];
484484
struct regmap *regmap;
485485
struct clk *clk[3];
486-
int channel;
486+
u32 channel;
487487
int ret, i;
488488

489489
counter = devm_counter_alloc(&pdev->dev, sizeof(*priv));
@@ -517,7 +517,7 @@ static int mchp_tc_probe(struct platform_device *pdev)
517517

518518
priv->channel[i] = channel;
519519

520-
snprintf(clk_name, sizeof(clk_name), "t%d_clk", channel);
520+
snprintf(clk_name, sizeof(clk_name), "t%u_clk", channel);
521521

522522
clk[i] = of_clk_get_by_name(np->parent, clk_name);
523523
if (IS_ERR(clk[i])) {

0 commit comments

Comments
 (0)