/* Failing a resume leaves the device resumed but closed.  */
static int bcm5974_open(struct input_dev *input)
/* Failing a resume leaves the device resumed but closed.  */
static int bcm5974_open(struct input_dev *input)
{
	struct bcm5974 *dev = input_get_drvdata(input);
	int error;
	error = usb_autopm_get_interface(dev->intf);
	if (error)
		return error;
	mutex_lock(&dev->pm_mutex);
	error = bcm5974_start_traffic(dev);
	if (!error)
		dev->opened = 1;
	mutex_unlock(&dev->pm_mutex);
	if (error)
		usb_autopm_put_interface(dev->intf);
	return error;
}