From 8c093da2f9ca5301d886dda4ec36726f09d9e23b Mon Sep 17 00:00:00 2001 From: Michael Krufky Date: Wed, 23 May 2007 19:41:06 -0400 Subject: Input: drivers/media - switch to using input_dev->dev.parent From: Dmitry Torokhov In preparation for struct class_device -> struct device input core conversion switch to using input_dev->dev.parent when specifying device position in sysfs tree. Signed-off-by: Dmitry Torokhov Acked-by: Thierry Merle Signed-off-by: Michael Krufky --- linux/drivers/media/video/bt8xx/bttv-input.c | 4 ++++ linux/drivers/media/video/cx88/cx88-input.c | 4 ++++ linux/drivers/media/video/saa7134/saa7134-input.c | 4 ++++ linux/drivers/media/video/usbvideo/konicawc.c | 4 ++++ linux/drivers/media/video/usbvideo/quickcam_messenger.c | 4 ++++ 5 files changed, 20 insertions(+) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/bt8xx/bttv-input.c b/linux/drivers/media/video/bt8xx/bttv-input.c index d25b4c912..fb5df7238 100644 --- a/linux/drivers/media/video/bt8xx/bttv-input.c +++ b/linux/drivers/media/video/bt8xx/bttv-input.c @@ -315,11 +315,15 @@ int bttv_input_init(struct bttv *btv) input_dev->id.vendor = btv->c.pci->vendor; input_dev->id.product = btv->c.pci->device; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + input_dev->dev.parent = &btv->c.pci->dev; +#else #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) input_dev->cdev.dev = &btv->c.pci->dev; #else input_dev->dev = &btv->c.pci->dev; #endif +#endif #endif btv->remote = ir; diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index a2e34e901..340523382 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -338,11 +338,15 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) input_dev->id.vendor = pci->vendor; input_dev->id.product = pci->device; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + input_dev->dev.parent = &pci->dev; +#else #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) input_dev->cdev.dev = &pci->dev; #else input_dev->dev = &pci->dev; #endif +#endif #endif /* record handles to ourself */ ir->core = core; diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c index c505076ae..2e32a86b4 100644 --- a/linux/drivers/media/video/saa7134/saa7134-input.c +++ b/linux/drivers/media/video/saa7134/saa7134-input.c @@ -379,11 +379,15 @@ int saa7134_input_init1(struct saa7134_dev *dev) input_dev->id.vendor = dev->pci->vendor; input_dev->id.product = dev->pci->device; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + input_dev->dev.parent = &dev->pci->dev; +#else #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) input_dev->cdev.dev = &dev->pci->dev; #else input_dev->dev = &dev->pci->dev; #endif +#endif #endif dev->remote = ir; diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c index 8ca93f248..2d5ab2044 100644 --- a/linux/drivers/media/video/usbvideo/konicawc.c +++ b/linux/drivers/media/video/usbvideo/konicawc.c @@ -243,10 +243,14 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev input_dev->name = "Konicawc snapshot button"; input_dev->phys = cam->input_physname; usb_to_input_id(dev, &input_dev->id); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + input_dev->dev.parent = &dev->dev; +#else #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) input_dev->cdev.dev = &dev->dev; #else input_dev->dev = &dev->dev; +#endif #endif input_dev->evbit[0] = BIT(EV_KEY); diff --git a/linux/drivers/media/video/usbvideo/quickcam_messenger.c b/linux/drivers/media/video/usbvideo/quickcam_messenger.c index 849f94bab..9593c8aa3 100644 --- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c @@ -105,10 +105,14 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev) input_dev->name = "QCM button"; input_dev->phys = cam->input_physname; usb_to_input_id(dev, &input_dev->id); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) + input_dev->dev.parent = &dev->dev; +#else #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) input_dev->cdev.dev = &dev->dev; #else input_dev->dev = &dev->dev; +#endif #endif input_dev->evbit[0] = BIT(EV_KEY); -- cgit v1.2.3