Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: Remove trivial get_brightness implementations

Since backlight core returns props.brightness in case get_brightness
is not implemented trivial implementations are not needed anymore.

Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Andrzej Hajda and committed by
Lee Jones
a5d8e2e7 a497c3ba

-120
-6
drivers/macintosh/via-pmu-backlight.c
··· 110 110 } 111 111 112 112 113 - static int pmu_backlight_get_brightness(struct backlight_device *bd) 114 - { 115 - return bd->props.brightness; 116 - } 117 - 118 113 static const struct backlight_ops pmu_backlight_data = { 119 - .get_brightness = pmu_backlight_get_brightness, 120 114 .update_status = pmu_backlight_update_status, 121 115 122 116 };
-6
drivers/platform/x86/samsung-q10.c
··· 46 46 return 0; 47 47 } 48 48 49 - static int samsungq10_bl_get_intensity(struct backlight_device *bd) 50 - { 51 - return bd->props.brightness; 52 - } 53 - 54 49 static const struct backlight_ops samsungq10_bl_ops = { 55 - .get_brightness = samsungq10_bl_get_intensity, 56 50 .update_status = samsungq10_bl_set_intensity, 57 51 }; 58 52
-6
drivers/video/backlight/aat2870_bl.c
··· 67 67 return aat2870->write(aat2870, AAT2870_BL_CH_EN, 0x0); 68 68 } 69 69 70 - static int aat2870_bl_get_brightness(struct backlight_device *bd) 71 - { 72 - return bd->props.brightness; 73 - } 74 - 75 70 static int aat2870_bl_update_status(struct backlight_device *bd) 76 71 { 77 72 struct aat2870_bl_driver_data *aat2870_bl = bl_get_data(bd); ··· 115 120 116 121 static const struct backlight_ops aat2870_bl_ops = { 117 122 .options = BL_CORE_SUSPENDRESUME, 118 - .get_brightness = aat2870_bl_get_brightness, 119 123 .update_status = aat2870_bl_update_status, 120 124 .check_fb = aat2870_bl_check_fb, 121 125 };
-6
drivers/video/backlight/ams369fg06.c
··· 410 410 return ams369fg06_power(lcd, power); 411 411 } 412 412 413 - static int ams369fg06_get_brightness(struct backlight_device *bd) 414 - { 415 - return bd->props.brightness; 416 - } 417 - 418 413 static int ams369fg06_set_brightness(struct backlight_device *bd) 419 414 { 420 415 int ret = 0; ··· 438 443 }; 439 444 440 445 static const struct backlight_ops ams369fg06_backlight_ops = { 441 - .get_brightness = ams369fg06_get_brightness, 442 446 .update_status = ams369fg06_set_brightness, 443 447 }; 444 448
-6
drivers/video/backlight/bd6107.c
··· 105 105 return 0; 106 106 } 107 107 108 - static int bd6107_backlight_get_brightness(struct backlight_device *backlight) 109 - { 110 - return backlight->props.brightness; 111 - } 112 - 113 108 static int bd6107_backlight_check_fb(struct backlight_device *backlight, 114 109 struct fb_info *info) 115 110 { ··· 116 121 static const struct backlight_ops bd6107_backlight_ops = { 117 122 .options = BL_CORE_SUSPENDRESUME, 118 123 .update_status = bd6107_backlight_update_status, 119 - .get_brightness = bd6107_backlight_get_brightness, 120 124 .check_fb = bd6107_backlight_check_fb, 121 125 }; 122 126
-6
drivers/video/backlight/gpio_backlight.c
··· 44 44 return 0; 45 45 } 46 46 47 - static int gpio_backlight_get_brightness(struct backlight_device *bl) 48 - { 49 - return bl->props.brightness; 50 - } 51 - 52 47 static int gpio_backlight_check_fb(struct backlight_device *bl, 53 48 struct fb_info *info) 54 49 { ··· 55 60 static const struct backlight_ops gpio_backlight_ops = { 56 61 .options = BL_CORE_SUSPENDRESUME, 57 62 .update_status = gpio_backlight_update_status, 58 - .get_brightness = gpio_backlight_get_brightness, 59 63 .check_fb = gpio_backlight_check_fb, 60 64 }; 61 65
-6
drivers/video/backlight/ld9040.c
··· 642 642 return lcd->power; 643 643 } 644 644 645 - static int ld9040_get_brightness(struct backlight_device *bd) 646 - { 647 - return bd->props.brightness; 648 - } 649 - 650 645 static int ld9040_set_brightness(struct backlight_device *bd) 651 646 { 652 647 int ret = 0, brightness = bd->props.brightness; ··· 669 674 }; 670 675 671 676 static const struct backlight_ops ld9040_backlight_ops = { 672 - .get_brightness = ld9040_get_brightness, 673 677 .update_status = ld9040_set_brightness, 674 678 }; 675 679
-6
drivers/video/backlight/lp855x_bl.c
··· 274 274 return 0; 275 275 } 276 276 277 - static int lp855x_bl_get_brightness(struct backlight_device *bl) 278 - { 279 - return bl->props.brightness; 280 - } 281 - 282 277 static const struct backlight_ops lp855x_bl_ops = { 283 278 .options = BL_CORE_SUSPENDRESUME, 284 279 .update_status = lp855x_bl_update_status, 285 - .get_brightness = lp855x_bl_get_brightness, 286 280 }; 287 281 288 282 static int lp855x_backlight_register(struct lp855x *lp)
-6
drivers/video/backlight/lp8788_bl.c
··· 176 176 return 0; 177 177 } 178 178 179 - static int lp8788_bl_get_brightness(struct backlight_device *bl_dev) 180 - { 181 - return bl_dev->props.brightness; 182 - } 183 - 184 179 static const struct backlight_ops lp8788_bl_ops = { 185 180 .options = BL_CORE_SUSPENDRESUME, 186 181 .update_status = lp8788_bl_update_status, 187 - .get_brightness = lp8788_bl_get_brightness, 188 182 }; 189 183 190 184 static int lp8788_backlight_register(struct lp8788_bl *bl)
-6
drivers/video/backlight/lv5207lp.c
··· 70 70 return 0; 71 71 } 72 72 73 - static int lv5207lp_backlight_get_brightness(struct backlight_device *backlight) 74 - { 75 - return backlight->props.brightness; 76 - } 77 - 78 73 static int lv5207lp_backlight_check_fb(struct backlight_device *backlight, 79 74 struct fb_info *info) 80 75 { ··· 81 86 static const struct backlight_ops lv5207lp_backlight_ops = { 82 87 .options = BL_CORE_SUSPENDRESUME, 83 88 .update_status = lv5207lp_backlight_update_status, 84 - .get_brightness = lv5207lp_backlight_get_brightness, 85 89 .check_fb = lv5207lp_backlight_check_fb, 86 90 }; 87 91
-6
drivers/video/backlight/pandora_bl.c
··· 100 100 return 0; 101 101 } 102 102 103 - static int pandora_backlight_get_brightness(struct backlight_device *bl) 104 - { 105 - return bl->props.brightness; 106 - } 107 - 108 103 static const struct backlight_ops pandora_backlight_ops = { 109 104 .options = BL_CORE_SUSPENDRESUME, 110 105 .update_status = pandora_backlight_update_status, 111 - .get_brightness = pandora_backlight_get_brightness, 112 106 }; 113 107 114 108 static int pandora_backlight_probe(struct platform_device *pdev)
-6
drivers/video/backlight/pwm_bl.c
··· 115 115 return 0; 116 116 } 117 117 118 - static int pwm_backlight_get_brightness(struct backlight_device *bl) 119 - { 120 - return bl->props.brightness; 121 - } 122 - 123 118 static int pwm_backlight_check_fb(struct backlight_device *bl, 124 119 struct fb_info *info) 125 120 { ··· 125 130 126 131 static const struct backlight_ops pwm_backlight_ops = { 127 132 .update_status = pwm_backlight_update_status, 128 - .get_brightness = pwm_backlight_get_brightness, 129 133 .check_fb = pwm_backlight_check_fb, 130 134 }; 131 135
-6
drivers/video/backlight/s6e63m0.c
··· 597 597 return lcd->power; 598 598 } 599 599 600 - static int s6e63m0_get_brightness(struct backlight_device *bd) 601 - { 602 - return bd->props.brightness; 603 - } 604 - 605 600 static int s6e63m0_set_brightness(struct backlight_device *bd) 606 601 { 607 602 int ret = 0, brightness = bd->props.brightness; ··· 624 629 }; 625 630 626 631 static const struct backlight_ops s6e63m0_backlight_ops = { 627 - .get_brightness = s6e63m0_get_brightness, 628 632 .update_status = s6e63m0_set_brightness, 629 633 }; 630 634
-6
drivers/video/backlight/tps65217_bl.c
··· 109 109 return rc; 110 110 } 111 111 112 - static int tps65217_bl_get_brightness(struct backlight_device *bl) 113 - { 114 - return bl->props.brightness; 115 - } 116 - 117 112 static const struct backlight_ops tps65217_bl_ops = { 118 113 .options = BL_CORE_SUSPENDRESUME, 119 114 .update_status = tps65217_bl_update_status, 120 - .get_brightness = tps65217_bl_get_brightness 121 115 }; 122 116 123 117 static int tps65217_bl_hw_init(struct tps65217_bl *tps65217_bl,
-6
drivers/video/fbdev/aty/aty128fb.c
··· 1802 1802 return 0; 1803 1803 } 1804 1804 1805 - static int aty128_bl_get_brightness(struct backlight_device *bd) 1806 - { 1807 - return bd->props.brightness; 1808 - } 1809 - 1810 1805 static const struct backlight_ops aty128_bl_data = { 1811 - .get_brightness = aty128_bl_get_brightness, 1812 1806 .update_status = aty128_bl_update_status, 1813 1807 }; 1814 1808
-6
drivers/video/fbdev/aty/atyfb_base.c
··· 2211 2211 return 0; 2212 2212 } 2213 2213 2214 - static int aty_bl_get_brightness(struct backlight_device *bd) 2215 - { 2216 - return bd->props.brightness; 2217 - } 2218 - 2219 2214 static const struct backlight_ops aty_bl_data = { 2220 - .get_brightness = aty_bl_get_brightness, 2221 2215 .update_status = aty_bl_update_status, 2222 2216 }; 2223 2217
-6
drivers/video/fbdev/aty/radeon_backlight.c
··· 123 123 return 0; 124 124 } 125 125 126 - static int radeon_bl_get_brightness(struct backlight_device *bd) 127 - { 128 - return bd->props.brightness; 129 - } 130 - 131 126 static const struct backlight_ops radeon_bl_data = { 132 - .get_brightness = radeon_bl_get_brightness, 133 127 .update_status = radeon_bl_update_status, 134 128 }; 135 129
-6
drivers/video/fbdev/exynos/s6e8ax0.c
··· 704 704 return lcd->power; 705 705 } 706 706 707 - static int s6e8ax0_get_brightness(struct backlight_device *bd) 708 - { 709 - return bd->props.brightness; 710 - } 711 - 712 707 static int s6e8ax0_set_brightness(struct backlight_device *bd) 713 708 { 714 709 int ret = 0, brightness = bd->props.brightness; ··· 731 736 }; 732 737 733 738 static const struct backlight_ops s6e8ax0_backlight_ops = { 734 - .get_brightness = s6e8ax0_get_brightness, 735 739 .update_status = s6e8ax0_set_brightness, 736 740 }; 737 741
-6
drivers/video/fbdev/nvidia/nv_backlight.c
··· 82 82 return 0; 83 83 } 84 84 85 - static int nvidia_bl_get_brightness(struct backlight_device *bd) 86 - { 87 - return bd->props.brightness; 88 - } 89 - 90 85 static const struct backlight_ops nvidia_bl_ops = { 91 - .get_brightness = nvidia_bl_get_brightness, 92 86 .update_status = nvidia_bl_update_status, 93 87 }; 94 88
-6
drivers/video/fbdev/riva/fbdev.c
··· 326 326 return 0; 327 327 } 328 328 329 - static int riva_bl_get_brightness(struct backlight_device *bd) 330 - { 331 - return bd->props.brightness; 332 - } 333 - 334 329 static const struct backlight_ops riva_bl_ops = { 335 - .get_brightness = riva_bl_get_brightness, 336 330 .update_status = riva_bl_update_status, 337 331 }; 338 332