VCP name for log factored out into function
Christoph Grenz
7 years ago
133 | 133 | .get_brightness = ddcci_backlight_get_brightness, |
134 | 134 | .check_fb = ddcci_backlight_check_fb, |
135 | 135 | }; |
136 | ||
137 | static const char *ddcci_monitor_vcp_name(unsigned char vcp) | |
138 | { | |
139 | switch (vcp) { | |
140 | case DDCCI_MONITOR_BL_WHITE: | |
141 | return "backlight"; | |
142 | case DDCCI_MONITOR_LUMINANCE: | |
143 | return "luminance"; | |
144 | default: | |
145 | return "???"; | |
146 | } | |
147 | } | |
136 | 148 | |
137 | 149 | static int ddcci_monitor_probe(struct ddcci_device *dev, |
138 | 150 | const struct ddcci_device_id *id) |
198 | 210 | return PTR_ERR(bl); |
199 | 211 | } |
200 | 212 | dev_info(&dev->dev, "registered %s as backlight device %s\n", |
201 | (drv_data->used_vcp == DDCCI_MONITOR_BL_WHITE) ? "backlight" : "luminance", | |
213 | ddcci_monitor_vcp_name(drv_data->used_vcp), | |
202 | 214 | dev_name(&dev->dev)); |
203 | 215 | |
204 | 216 | goto end; |