.. | .. |
---|
35 | 35 | { |
---|
36 | 36 | struct gpio_backlight *gbl = bl_get_data(bl); |
---|
37 | 37 | |
---|
38 | | - return gbl->fbdev == NULL || gbl->fbdev == info->dev; |
---|
| 38 | + return gbl->fbdev == NULL || gbl->fbdev == info->device; |
---|
39 | 39 | } |
---|
40 | 40 | |
---|
41 | 41 | static const struct backlight_ops gpio_backlight_ops = { |
---|
.. | .. |
---|
87 | 87 | /* Not booted with device tree or no phandle link to the node */ |
---|
88 | 88 | bl->props.power = def_value ? FB_BLANK_UNBLANK |
---|
89 | 89 | : FB_BLANK_POWERDOWN; |
---|
90 | | - else if (gpiod_get_direction(gbl->gpiod) == 0 && |
---|
91 | | - gpiod_get_value_cansleep(gbl->gpiod) == 0) |
---|
| 90 | + else if (gpiod_get_value_cansleep(gbl->gpiod) == 0) |
---|
92 | 91 | bl->props.power = FB_BLANK_POWERDOWN; |
---|
93 | 92 | else |
---|
94 | 93 | bl->props.power = FB_BLANK_UNBLANK; |
---|