[sane-devel] Re: scanner.o modules

Sergey Vlasov vsu@altlinux.ru
Fri, 14 Mar 2003 15:09:11 +0300


On Fri, 14 Mar 2003 08:57:57 +0100
Lars Täuber <taeuber@bbaw.de> wrote:

> how come that the scanner.o module (e.g. 2.4.20) is not automatically 
> loaded (after depmod -a ) when i have the following line in my modules.conf:
> 
> alias char-major-180-48 scanner

This won't work (at least with 2.4.20). Use hotplug scripts, or load
the module explicitly during boot.

This is from linux-2.4.20/drivers/usb/usb.c:

static int usb_open(struct inode * inode, struct file * file)
{
	int minor = MINOR(inode->i_rdev);
	struct usb_driver *c = usb_minors[minor/16];
	int err = -ENODEV;
	struct file_operations *old_fops, *new_fops = NULL;

	/*
	 * No load-on-demand? Randy, could you ACK that it's really not
	 * supposed to be done?					-- AV
	 */
	if (!c || !(new_fops = fops_get(c->fops)))
		return err;