On Mon, Feb 16, 2009 at 09:53:54PM -0500, Mike Murphy wrote: > struct usb_xpad { > struct input_dev *dev; /* input device interface */ > struct usb_device *udev; /* usb device */ > ... > }; > > This is not my code... it was set up this way in the stable xpad driver. And it is correct :) > So it looks like I'm stuck with a struct input_dev * pointer to the > input device, a struct device * pointer in the show/store handlers, > and no way to get back to struct usb_xpad * with the container_of > macro. Unless, of course, there is something I don't know about > container_of (or another macro I can use in this instance). input_set_drvdata() and input_get_drvdata() is what you are looking for. Hope this helps, greg k-h -- 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