Codebase list ddcci-driver-linux / bfa508f
VCP name for log factored out into function Christoph Grenz 7 years ago
1 changed file(s) with 13 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
133133 .get_brightness = ddcci_backlight_get_brightness,
134134 .check_fb = ddcci_backlight_check_fb,
135135 };
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 }
136148
137149 static int ddcci_monitor_probe(struct ddcci_device *dev,
138150 const struct ddcci_device_id *id)
198210 return PTR_ERR(bl);
199211 }
200212 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),
202214 dev_name(&dev->dev));
203215
204216 goto end;