diff options
Diffstat (limited to 'drivers/video/backlight/progear_bl.c')
-rw-r--r-- | drivers/video/backlight/progear_bl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/backlight/progear_bl.c b/drivers/video/backlight/progear_bl.c index 2ec16deb2397..809278c90738 100644 --- a/drivers/video/backlight/progear_bl.c +++ b/drivers/video/backlight/progear_bl.c | |||
@@ -61,6 +61,7 @@ static const struct backlight_ops progearbl_ops = { | |||
61 | 61 | ||
62 | static int progearbl_probe(struct platform_device *pdev) | 62 | static int progearbl_probe(struct platform_device *pdev) |
63 | { | 63 | { |
64 | struct backlight_properties props; | ||
64 | u8 temp; | 65 | u8 temp; |
65 | struct backlight_device *progear_backlight_device; | 66 | struct backlight_device *progear_backlight_device; |
66 | int ret; | 67 | int ret; |
@@ -82,9 +83,12 @@ static int progearbl_probe(struct platform_device *pdev) | |||
82 | pci_read_config_byte(sb_dev, SB_MPS1, &temp); | 83 | pci_read_config_byte(sb_dev, SB_MPS1, &temp); |
83 | pci_write_config_byte(sb_dev, SB_MPS1, temp | 0x20); | 84 | pci_write_config_byte(sb_dev, SB_MPS1, temp | 0x20); |
84 | 85 | ||
86 | memset(&props, 0, sizeof(struct backlight_properties)); | ||
87 | props.max_brightness = HW_LEVEL_MAX - HW_LEVEL_MIN; | ||
85 | progear_backlight_device = backlight_device_register("progear-bl", | 88 | progear_backlight_device = backlight_device_register("progear-bl", |
86 | &pdev->dev, NULL, | 89 | &pdev->dev, NULL, |
87 | &progearbl_ops); | 90 | &progearbl_ops, |
91 | &props); | ||
88 | if (IS_ERR(progear_backlight_device)) { | 92 | if (IS_ERR(progear_backlight_device)) { |
89 | ret = PTR_ERR(progear_backlight_device); | 93 | ret = PTR_ERR(progear_backlight_device); |
90 | goto put_sb; | 94 | goto put_sb; |
@@ -94,7 +98,6 @@ static int progearbl_probe(struct platform_device *pdev) | |||
94 | 98 | ||
95 | progear_backlight_device->props.power = FB_BLANK_UNBLANK; | 99 | progear_backlight_device->props.power = FB_BLANK_UNBLANK; |
96 | progear_backlight_device->props.brightness = HW_LEVEL_MAX - HW_LEVEL_MIN; | 100 | progear_backlight_device->props.brightness = HW_LEVEL_MAX - HW_LEVEL_MIN; |
97 | progear_backlight_device->props.max_brightness = HW_LEVEL_MAX - HW_LEVEL_MIN; | ||
98 | progearbl_set_intensity(progear_backlight_device); | 101 | progearbl_set_intensity(progear_backlight_device); |
99 | 102 | ||
100 | return 0; | 103 | return 0; |