Exemple #1
0
static int ssu100_attach(struct usb_serial *serial)
{
	struct ssu100_port_private *priv;
	struct usb_serial_port *port = *serial->port;

	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
	if (!priv) {
		dev_err(&port->dev, "%s- kmalloc(%Zd) failed.\n", __func__,
			sizeof(*priv));
		return -ENOMEM;
	}

	spin_lock_init(&priv->status_lock);
	init_waitqueue_head(&priv->delta_msr_wait);
	usb_set_serial_port_data(port, priv);

	return ssu100_initdevice(serial->dev);
}
Exemple #2
0
static int ssu100_attach(struct usb_serial *serial)
{
	return ssu100_initdevice(serial->dev);
}