Skip to content

Commit fb28a65

Browse files
author
Laurent Pinchart
committed
clocksource: sh_cmt: Hardcode CMT clock source rating to 125
All boards use or should use a clock source rating of 125 for the CMT, hardcode it in the driver. Signed-off-by: Laurent Pinchart <[email protected]>
1 parent b7fcbb0 commit fb28a65

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/clocksource/sh_cmt.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,12 +656,12 @@ static void sh_cmt_clocksource_resume(struct clocksource *cs)
656656
}
657657

658658
static int sh_cmt_register_clocksource(struct sh_cmt_channel *ch,
659-
const char *name, unsigned long rating)
659+
const char *name)
660660
{
661661
struct clocksource *cs = &ch->cs;
662662

663663
cs->name = name;
664-
cs->rating = rating;
664+
cs->rating = 125;
665665
cs->read = sh_cmt_clocksource_read;
666666
cs->enable = sh_cmt_clocksource_enable;
667667
cs->disable = sh_cmt_clocksource_disable;
@@ -788,13 +788,13 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
788788
}
789789

790790
static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
791-
bool clockevent, unsigned long clocksource_rating)
791+
bool clockevent, bool clocksource)
792792
{
793793
if (clockevent)
794794
sh_cmt_register_clockevent(ch, name);
795795

796-
if (clocksource_rating)
797-
sh_cmt_register_clocksource(ch, name, clocksource_rating);
796+
if (clocksource)
797+
sh_cmt_register_clocksource(ch, name);
798798

799799
return 0;
800800
}
@@ -827,7 +827,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
827827

828828
ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
829829
cfg->clockevent_rating != 0,
830-
cfg->clocksource_rating);
830+
cfg->clocksource_rating != 0);
831831
if (ret) {
832832
dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",
833833
ch->index);

0 commit comments

Comments
 (0)