From c25e647836cd53f2da7ceff6fabf2603b4362212 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 May 2012 15:33:00 -0700 Subject: [PATCH] USB: input: powermate.c: fix up dev_* messages Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/misc/powermate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index d16717e8e9c4..49c0c3ebd321 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -65,6 +65,7 @@ struct powermate_device { struct urb *irq, *config; struct usb_ctrlrequest *configcr; struct usb_device *udev; + struct usb_interface *intf; struct input_dev *input; spinlock_t lock; int static_brightness; @@ -85,7 +86,7 @@ static void powermate_config_complete(struct urb *urb); static void powermate_irq(struct urb *urb) { struct powermate_device *pm = urb->context; - struct device *dev = &pm->input->dev; + struct device *dev = &pm->intf->dev; int retval; switch (urb->status) { @@ -333,6 +334,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i goto fail3; pm->udev = udev; + pm->intf = intf; pm->input = input_dev; usb_make_path(udev, pm->phys, sizeof(pm->phys)); -- 2.20.1