--- zzzz-none-000/linux-3.10.107/drivers/video/backlight/lp8788_bl.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/video/backlight/lp8788_bl.c 2021-02-04 17:41:59.000000000 +0000 @@ -52,7 +52,7 @@ struct pwm_device *pwm; }; -struct lp8788_bl_config default_bl_config = { +static struct lp8788_bl_config default_bl_config = { .bl_mode = LP8788_BL_REGISTER_ONLY, .dim_mode = LP8788_DIM_EXPONENTIAL, .full_scale = LP8788_FULLSCALE_1900uA, @@ -63,13 +63,13 @@ static inline bool is_brightness_ctrl_by_pwm(enum lp8788_bl_ctrl_mode mode) { - return (mode == LP8788_BL_COMB_PWM_BASED); + return mode == LP8788_BL_COMB_PWM_BASED; } static inline bool is_brightness_ctrl_by_register(enum lp8788_bl_ctrl_mode mode) { - return (mode == LP8788_BL_REGISTER_ONLY || - mode == LP8788_BL_COMB_REGISTER_BASED); + return mode == LP8788_BL_REGISTER_ONLY || + mode == LP8788_BL_COMB_REGISTER_BASED; } static int lp8788_backlight_configure(struct lp8788_bl *bl) @@ -176,15 +176,9 @@ return 0; } -static int lp8788_bl_get_brightness(struct backlight_device *bl_dev) -{ - return bl_dev->props.brightness; -} - static const struct backlight_ops lp8788_bl_ops = { .options = BL_CORE_SUSPENDRESUME, .update_status = lp8788_bl_update_status, - .get_brightness = lp8788_bl_get_brightness, }; static int lp8788_backlight_register(struct lp8788_bl *bl) @@ -227,8 +221,7 @@ { struct backlight_device *bl_dev = bl->bl_dev; - if (bl_dev) - backlight_device_unregister(bl_dev); + backlight_device_unregister(bl_dev); } static ssize_t lp8788_get_bl_ctl_mode(struct device *dev, @@ -312,7 +305,6 @@ backlight_update_status(bl_dev); sysfs_remove_group(&pdev->dev.kobj, &lp8788_attr_group); lp8788_backlight_unregister(bl); - platform_set_drvdata(pdev, NULL); return 0; } @@ -322,7 +314,6 @@ .remove = lp8788_backlight_remove, .driver = { .name = LP8788_DEV_BACKLIGHT, - .owner = THIS_MODULE, }, }; module_platform_driver(lp8788_bl_driver);