Skip to content

Commit 074fcdf

Browse files
morimotopmundt
authored andcommitted
sh: clock-sh7343: add CLKDEV_ICK_ID for cleanup
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent ac6b4fd commit 074fcdf

1 file changed

Lines changed: 7 additions & 21 deletions

File tree

‎arch/sh/kernel/cpu/sh4a/clock-sh7343.c‎

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ static struct clk mstp_clks[MSTP_NR] = {
196196

197197
#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk }
198198
#define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk }
199+
#define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk }
199200

200201
static struct clk_lookup lookups[] = {
201202
/* main clocks */
@@ -234,27 +235,12 @@ static struct clk_lookup lookups[] = {
234235
CLKDEV_CON_ID("rwdt0", &mstp_clks[MSTP013]),
235236
CLKDEV_CON_ID("mfi0", &mstp_clks[MSTP011]),
236237
CLKDEV_CON_ID("flctl0", &mstp_clks[MSTP010]),
237-
{
238-
/* SCIF0 */
239-
.dev_id = "sh-sci.0",
240-
.con_id = "sci_fck",
241-
.clk = &mstp_clks[MSTP007],
242-
}, {
243-
/* SCIF1 */
244-
.dev_id = "sh-sci.1",
245-
.con_id = "sci_fck",
246-
.clk = &mstp_clks[MSTP006],
247-
}, {
248-
/* SCIF2 */
249-
.dev_id = "sh-sci.2",
250-
.con_id = "sci_fck",
251-
.clk = &mstp_clks[MSTP005],
252-
}, {
253-
/* SCIF3 */
254-
.dev_id = "sh-sci.3",
255-
.con_id = "sci_fck",
256-
.clk = &mstp_clks[MSTP004],
257-
},
238+
239+
CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP007]),
240+
CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP006]),
241+
CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP005]),
242+
CLKDEV_ICK_ID("sci_fck", "sh-sci.3", &mstp_clks[MSTP004]),
243+
258244
CLKDEV_CON_ID("sio0", &mstp_clks[MSTP003]),
259245
CLKDEV_CON_ID("siof0", &mstp_clks[MSTP002]),
260246
CLKDEV_CON_ID("siof1", &mstp_clks[MSTP001]),

0 commit comments

Comments
 (0)