About mounting the sysfs

2007-12-17 Thread wit
Hi all, Currently, I'm studying the code of the sysfs. But I got the following questions: 1. What is the d_alloc_root used for? Actually, the question should be: why we have to call d_alloc_root. I think the root already has its dentry, why we have to allocate another while we mounting a file

about mounting the sysfs

2007-12-05 Thread wit
Hi, I found the initialization code of the sysfs in version 2.6.22: int __init sysfs_init(void) { int err = -ENOMEM; sysfs_dir_cachep = kmem_cache_create("sysfs_dir_cache", sizeof(struct sysfs_dirent), 0, 0, NULL, NULL); if (!sysf

Re: about probing a device

2007-10-11 Thread wit
thanks all.. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: about probing a device

2007-10-10 Thread wit
Thanks very much. > The first one which matches and successfully attaches "wins". Seems that calling the bind routine can bind a driver to a device. Is there any bad side effect of doing such thing? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

about probing a device

2007-10-09 Thread wit
Hi, I found these routines in the kernel, does this means only one driver can be matched to a device? What if two drivers both can drive the device, like sd & sg in scsi subsystem? static int device_attach(struct device * dev) { struct bus_type * bus = dev->bus; struct list_head *