if (!gb_gpio_controller)
return -ENOMEM;
gb_gpio_controller->connection = connection;
+ connection->private = gb_gpio_controller;
ret = gb_gpio_controller_setup(gb_gpio_controller);
if (ret)
pr_err("Failed to register GPIO\n");
return ret;
}
- connection->private = gb_gpio_controller;
return 0;
out_err:
return -ENOMEM;
gb_i2c_dev->connection = connection; /* refcount? */
+ connection->private = gb_i2c_dev;
ret = gb_i2c_device_setup(gb_i2c_dev);
if (ret)
if (ret)
goto out_err;
- connection->private = gb_i2c_dev;
-
return 0;
out_err:
/* kref_put(gb_i2c_dev->connection) */
if (!pwmc)
return -ENOMEM;
pwmc->connection = connection;
+ connection->private = pwmc;
/* Check for compatible protocol version */
ret = gb_pwm_proto_version_operation(pwmc);
pr_err("Failed to register PWM\n");
return ret;
}
- connection->private = pwmc;
return 0;
out_err:
if (!gb_tty)
return -ENOMEM;
gb_tty->connection = connection;
+ connection->private = gb_tty;
/* Check for compatible protocol version */
retval = get_version(gb_tty);
init_waitqueue_head(&gb_tty->wioctl);
mutex_init(&gb_tty->mutex);
- connection->private = gb_tty;
-
send_control(gb_tty, gb_tty->ctrlout);
/* initialize the uart to be 9600n81 */
return -ENOMEM;
gb_usb_dev->connection = connection;
+ connection->private = gb_usb_dev;
/* Check for compatible protocol version */
retval = get_version(gb_usb_dev);
return -ENOMEM;
vib->connection = connection;
+ connection->private = vib;
retval = get_version(vib);
if (retval)