Skip to content

Commit 4bf23b9

Browse files
glneogclement
authored andcommitted
ARM: orion5x: Switch to new sys-off handler API
Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API. Signed-off-by: Andrew Davis <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Gregory CLEMENT <[email protected]>
1 parent 499243b commit 4bf23b9

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

arch/arm/mach-orion5x/board-mss2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ static void mss2_power_off(void)
8282
void __init mss2_init(void)
8383
{
8484
/* register mss2 specific power-off method */
85-
pm_power_off = mss2_power_off;
85+
register_platform_power_off(mss2_power_off);
8686
}

arch/arm/mach-orion5x/dns323-setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ static void __init dns323_init(void)
700700
if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
701701
gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
702702
pr_err("DNS-323: failed to setup power-off GPIO\n");
703-
pm_power_off = dns323a_power_off;
703+
register_platform_power_off(dns323a_power_off);
704704
break;
705705
case DNS323_REV_B1:
706706
/* 5182 built-in SATA init */
@@ -717,7 +717,7 @@ static void __init dns323_init(void)
717717
if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
718718
gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
719719
pr_err("DNS-323: failed to setup power-off GPIO\n");
720-
pm_power_off = dns323b_power_off;
720+
register_platform_power_off(dns323b_power_off);
721721
break;
722722
case DNS323_REV_C1:
723723
/* 5182 built-in SATA init */
@@ -727,7 +727,7 @@ static void __init dns323_init(void)
727727
if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 ||
728728
gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0)
729729
pr_err("DNS-323: failed to setup power-off GPIO\n");
730-
pm_power_off = dns323c_power_off;
730+
register_platform_power_off(dns323c_power_off);
731731

732732
/* Now, -this- should theoretically be done by the sata_mv driver
733733
* once I figure out what's going on there. Maybe the behaviour

arch/arm/mach-orion5x/kurobox_pro-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static void __init kurobox_pro_init(void)
373373
i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
374374

375375
/* register Kurobox Pro specific power-off method */
376-
pm_power_off = kurobox_pro_power_off;
376+
register_platform_power_off(kurobox_pro_power_off);
377377
}
378378

379379
#ifdef CONFIG_MACH_KUROBOX_PRO

arch/arm/mach-orion5x/mv2120-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static void __init mv2120_init(void)
238238
if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
239239
gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
240240
pr_err("mv2120: failed to setup power-off GPIO\n");
241-
pm_power_off = mv2120_power_off;
241+
register_platform_power_off(mv2120_power_off);
242242
}
243243

244244
/* Warning: HP uses a wrong mach-type (=526) in their bootloader */

arch/arm/mach-orion5x/net2big-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static void __init net2big_init(void)
423423

424424
if (gpio_request(NET2BIG_GPIO_POWER_OFF, "power-off") == 0 &&
425425
gpio_direction_output(NET2BIG_GPIO_POWER_OFF, 0) == 0)
426-
pm_power_off = net2big_power_off;
426+
register_platform_power_off(net2big_power_off);
427427
else
428428
pr_err("net2big: failed to configure power-off GPIO\n");
429429

arch/arm/mach-orion5x/terastation_pro2-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static void __init tsp2_init(void)
349349
i2c_register_board_info(0, &tsp2_i2c_rtc, 1);
350350

351351
/* register Terastation Pro II specific power-off method */
352-
pm_power_off = tsp2_power_off;
352+
register_platform_power_off(tsp2_power_off);
353353
}
354354

355355
MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")

arch/arm/mach-orion5x/ts209-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static void __init qnap_ts209_init(void)
314314
i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
315315

316316
/* register tsx09 specific power-off method */
317-
pm_power_off = qnap_tsx09_power_off;
317+
register_platform_power_off(qnap_tsx09_power_off);
318318
}
319319

320320
MACHINE_START(TS209, "QNAP TS-109/TS-209")

arch/arm/mach-orion5x/ts409-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static void __init qnap_ts409_init(void)
312312
platform_device_register(&ts409_leds);
313313

314314
/* register tsx09 specific power-off method */
315-
pm_power_off = qnap_tsx09_power_off;
315+
register_platform_power_off(qnap_tsx09_power_off);
316316
}
317317

318318
MACHINE_START(TS409, "QNAP TS-409")

0 commit comments

Comments
 (0)