Skip to content

Commit

Permalink
USB: input: powermate.c: fix up dev_* messages
Browse files Browse the repository at this point in the history
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 <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed May 4, 2012
1 parent 419b1a1 commit c25e647
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/input/misc/powermate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit c25e647

Please sign in to comment.