Re: drivers for spectrometer device and ARM SAM-BA USB Bootloader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Sonntag, 31. Mai 2009 18:03:07 schrieb Alexander Lyasin:
> Hi all!
> There are drivers for 2.6.28 .. Linux kernels
> They have been tested and work.
> I am still a beginner and I do not know where to send the source code,
> maybe they would useful for community.
> Alexander V. Lyasin

That's a bug:
	retval=send_hello(dev);
	if (retval) SAMERR("not reply from device, err code: %i", retval);
exit:
	return retval;
}

If you return an error from open() you must undo all changes.

static ssize_t at91sam_write (struct file *file,
		const char __user *buffer, size_t count, loff_t *ppos) {
	int retval=0,
	    count_bytes,
	    needed_write_bytes=0;
	char addrbuf[ADDRESS_SIZE+1],
	     lendata[ADDRESS_SIZE+1],

DMA on the stack. On some architectures this will fail.

	mutex_lock(&dev->io_mutex);
	if (!dev->interface) {
		SAMERR("can't get device interfase from %s", __FUNCTION__);
		return -ENODEV;
	}

You must not return with a mutex held.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux