/* Ioctl subroutines can safely be made inline, because they are called only from cosa_ioctl().  */
static int cosa_reset(struct cosa_data *cosa)
/* Ioctl subroutines can safely be made inline, because they are called only from cosa_ioctl().  */
static int cosa_reset(struct cosa_data *cosa)
{
	char idstring[COSA_MAX_ID_STRING];
	if (cosa->usage > 1)
		printk(KERN_INFO "cosa%d: WARNING: reset requested with cosa->usage > 1 (%d). Odd things may happen.\n",
			cosa->num, cosa->usage);
	cosa->firmware_status &= ~(COSA_FW_RESET|COSA_FW_START);
	if (cosa_reset_and_read_id(cosa, idstring) < 0) {
		printk(KERN_NOTICE "cosa%d: reset failed\n", cosa->num);
		return -EIO;
	}
	printk(KERN_INFO "cosa%d: resetting device: %s\n", cosa->num,
		idstring);
	cosa->firmware_status |= COSA_FW_RESET;
	return 0;
}