static int gb_lights_light_v4l2_register(struct gb_light *light)
{
struct gb_connection *connection = get_conn_from_light(light);
- struct device *dev = &connection->dev;
+ struct device *dev = &connection->bundle->dev;
struct v4l2_flash_config *sd_cfg;
struct led_classdev_flash *fled;
struct led_classdev_flash *iled = NULL;
{
struct gb_connection *connection = get_conn_from_light(light);
- dev_err(&connection->dev, "no support for v4l2 subdevices\n");
+ dev_err(&connection->bundle->dev, "no support for v4l2 subdevices\n");
return 0;
}
{
struct gb_connection *connection = get_conn_from_channel(channel);
- dev_err(&connection->dev, "no support for flash devices\n");
+ dev_err(&connection->bundle->dev, "no support for flash devices\n");
return 0;
}
for (i = 0; i < glights->lights_count; i++) {
ret = gb_lights_light_config(glights, i);
if (ret < 0) {
- dev_err(&connection->dev,
+ dev_err(&connection->bundle->dev,
"Fail to configure lights device\n");
goto out;
}
static int gb_lights_event_recv(u8 type, struct gb_operation *op)
{
struct gb_connection *connection = op->connection;
+ struct device *dev = &connection->bundle->dev;
struct gb_lights *glights = connection->private;
struct gb_message *request;
struct gb_lights_event_request *payload;
u8 event;
if (type != GB_LIGHTS_TYPE_EVENT) {
- dev_err(&connection->dev,
- "Unsupported unsolicited event: %u\n", type);
+ dev_err(dev, "Unsupported unsolicited event: %u\n", type);
return -EINVAL;
}
request = op->request;
if (request->payload_size < sizeof(*payload)) {
- dev_err(&connection->dev,
- "Wrong event size received (%zu < %zu)\n",
+ dev_err(dev, "Wrong event size received (%zu < %zu)\n",
request->payload_size, sizeof(*payload));
return -EINVAL;
}
light_id = payload->light_id;
if (light_id >= glights->lights_count || !&glights->lights[light_id]) {
- dev_err(&connection->dev,
- "Event received for unconfigured light id: %d\n",
+ dev_err(dev, "Event received for unconfigured light id: %d\n",
light_id);
return -EINVAL;
}