lkml.org 
[lkml]   [2010]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] backlight, appledisplay: fix incomplete registration failure handling
    On error while registering backlight, return it to caller instead of
    returning 0.
    Mark struct backlight_ops as const.

    Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
    ---
    drivers/usb/misc/appledisplay.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
    index 1eb9e41..ef79ca2 100644
    --- a/drivers/usb/misc/appledisplay.c
    +++ b/drivers/usb/misc/appledisplay.c
    @@ -179,7 +179,7 @@ static int appledisplay_bl_get_brightness(struct backlight_device *bd)
    return pdata->msgdata[1];
    }

    -static struct backlight_ops appledisplay_bl_data = {
    +static const struct backlight_ops appledisplay_bl_data = {
    .get_brightness = appledisplay_bl_get_brightness,
    .update_status = appledisplay_bl_update_status,
    };
    @@ -283,6 +283,7 @@ static int appledisplay_probe(struct usb_interface *iface,
    &appledisplay_bl_data);
    if (IS_ERR(pdata->bd)) {
    dev_err(&iface->dev, "Backlight registration failed\n");
    + retval = PTR_ERR(pdata->bd);
    goto error;
    }

    --
    1.6.4.4
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-02-26 13:25    [W:0.021 / U:61.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site