On Friday 08 October 2010 02:26:21 Zhang Rui wrote: > On Fri, 2010-10-01 at 16:53 +0800, Thomas Renninger wrote: > > Boot and compile tested. > > The fact that pnp.ids can now be empty needs testing on some > > further machines, though. ... > > - result = device_create_file(&dev->dev, &dev_attr_hid); > > - if (result) > > - goto end; > > + if (!list_empty(&dev->pnp.ids)) { > > + result = device_create_file(&dev->dev, &dev_attr_hid); > > + if (result) > > + goto end; > > > > - result = device_create_file(&dev->dev, &dev_attr_modalias); > > - if (result) > > - goto end; > > + result = device_create_file(&dev->dev, &dev_attr_modalias); > > + if (result) > > + goto end; > > + } > > > > the "hid" attribute exports the first entry of the device.pnp..ids list, > while "modalias" exports all the entries. > now it seems that the "hid" file is redundant, right? Yep. You need some parsing, but udev is already doing that. But it's sysfs api..., you'd need to add a: printk_once("Deprecated HID file accessed by %s, use modalias instead\n", current->comm); and deprecate that for some years. Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html