소스 검색

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 <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman 13 년 전
부모
커밋
c25e647836
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      drivers/input/misc/powermate.c

+ 3 - 1
drivers/input/misc/powermate.c

@@ -65,6 +65,7 @@ struct powermate_device {
 	struct urb *irq, *config;
 	struct urb *irq, *config;
 	struct usb_ctrlrequest *configcr;
 	struct usb_ctrlrequest *configcr;
 	struct usb_device *udev;
 	struct usb_device *udev;
+	struct usb_interface *intf;
 	struct input_dev *input;
 	struct input_dev *input;
 	spinlock_t lock;
 	spinlock_t lock;
 	int static_brightness;
 	int static_brightness;
@@ -85,7 +86,7 @@ static void powermate_config_complete(struct urb *urb);
 static void powermate_irq(struct urb *urb)
 static void powermate_irq(struct urb *urb)
 {
 {
 	struct powermate_device *pm = urb->context;
 	struct powermate_device *pm = urb->context;
-	struct device *dev = &pm->input->dev;
+	struct device *dev = &pm->intf->dev;
 	int retval;
 	int retval;
 
 
 	switch (urb->status) {
 	switch (urb->status) {
@@ -333,6 +334,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
 		goto fail3;
 		goto fail3;
 
 
 	pm->udev = udev;
 	pm->udev = udev;
+	pm->intf = intf;
 	pm->input = input_dev;
 	pm->input = input_dev;
 
 
 	usb_make_path(udev, pm->phys, sizeof(pm->phys));
 	usb_make_path(udev, pm->phys, sizeof(pm->phys));