Skip to content

Commit 0806a13

Browse files
lkundraksre
authored andcommitted
x86/platform/olpc: Don't split string literals when fixing up the DT
It was pointed out in a review, and checkpatch.pl complains about this. Breaking it down into multiple ofw evaluations works just as well and reads better. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent d25ad7f commit 0806a13

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

arch/x86/platform/olpc/olpc_dt.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -242,29 +242,34 @@ void __init olpc_dt_fixup(void)
242242
pr_info("PROM DT: Old firmware detected, applying fixes\n");
243243

244244
/* Add olpc,xo1-battery compatible marker to battery node */
245-
olpc_dt_interpret("\" /battery@0\" find-device"
246-
" \" olpc,xo1-battery\" +compatible"
247-
" device-end");
245+
olpc_dt_interpret("\" /battery@0\" find-device");
246+
olpc_dt_interpret(" \" olpc,xo1-battery\" +compatible");
247+
olpc_dt_interpret("device-end");
248248

249249
board_rev = olpc_dt_get_board_revision();
250250
if (!board_rev)
251251
return;
252252

253253
if (board_rev >= olpc_board_pre(0xd0)) {
254254
/* XO-1.5: add dcon device */
255-
olpc_dt_interpret("\" /pci/display@1\" find-device"
256-
" new-device"
257-
" \" dcon\" device-name \" olpc,xo1-dcon\" +compatible"
258-
" finish-device device-end");
255+
olpc_dt_interpret("\" /pci/display@1\" find-device");
256+
olpc_dt_interpret(" new-device");
257+
olpc_dt_interpret(" \" dcon\" device-name");
258+
olpc_dt_interpret(" \" olpc,xo1-dcon\" +compatible");
259+
olpc_dt_interpret(" finish-device");
260+
olpc_dt_interpret("device-end");
259261
} else {
260262
/* XO-1: add dcon device, mark RTC as olpc,xo1-rtc */
261-
olpc_dt_interpret("\" /pci/display@1,1\" find-device"
262-
" new-device"
263-
" \" dcon\" device-name \" olpc,xo1-dcon\" +compatible"
264-
" finish-device device-end"
265-
" \" /rtc\" find-device"
266-
" \" olpc,xo1-rtc\" +compatible"
267-
" device-end");
263+
olpc_dt_interpret("\" /pci/display@1,1\" find-device");
264+
olpc_dt_interpret(" new-device");
265+
olpc_dt_interpret(" \" dcon\" device-name");
266+
olpc_dt_interpret(" \" olpc,xo1-dcon\" +compatible");
267+
olpc_dt_interpret(" finish-device");
268+
olpc_dt_interpret("device-end");
269+
270+
olpc_dt_interpret("\" /rtc\" find-device");
271+
olpc_dt_interpret(" \" olpc,xo1-rtc\" +compatible");
272+
olpc_dt_interpret("device-end");
268273
}
269274
}
270275

0 commit comments

Comments
 (0)