From 7a4d476ec69b242ee0ab6ba5204f90dd5f86d35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Pr=C3=A9mont?= Date: Fri, 26 Feb 2010 13:20:10 +0100 Subject: [PATCH] --- yaml --- r: 188185 b: refs/heads/master c: ec57af9c2ece22ae6234189972105d777ff5f939 h: refs/heads/master i: 188183: 76327bcf6b582b5c199035d64b1fd395eb6c477e v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/panasonic-laptop.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index ca45696bd691..6d4aba752b5b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 28d85873cd6d8d3176e30e02b941b1329df1024c +refs/heads/master: ec57af9c2ece22ae6234189972105d777ff5f939 diff --git a/trunk/drivers/platform/x86/panasonic-laptop.c b/trunk/drivers/platform/x86/panasonic-laptop.c index ab5c9cea1462..726f02affcb6 100644 --- a/trunk/drivers/platform/x86/panasonic-laptop.c +++ b/trunk/drivers/platform/x86/panasonic-laptop.c @@ -352,7 +352,7 @@ static int bl_set_status(struct backlight_device *bd) return acpi_pcc_write_sset(pcc, SINF_DC_CUR_BRIGHT, bright); } -static struct backlight_ops pcc_backlight_ops = { +static const struct backlight_ops pcc_backlight_ops = { .get_brightness = bl_get, .update_status = bl_set_status, }; @@ -651,8 +651,10 @@ static int acpi_pcc_hotkey_add(struct acpi_device *device) props.max_brightness = pcc->sinf[SINF_AC_MAX_BRIGHT]; pcc->backlight = backlight_device_register("panasonic", NULL, pcc, &pcc_backlight_ops, &props); - if (IS_ERR(pcc->backlight)) + if (IS_ERR(pcc->backlight)) { + result = PTR_ERR(pcc->backlight); goto out_sinf; + } /* read the initial brightness setting from the hardware */ pcc->backlight->props.brightness = pcc->sinf[SINF_AC_CUR_BRIGHT];