Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: input: cm109.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>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+10 -10
+10 -10
drivers/input/misc/cm109.c
··· 327 327 328 328 error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); 329 329 if (error) 330 - dev_err(&dev->idev->dev, 330 + dev_err(&dev->intf->dev, 331 331 "%s: usb_submit_urb (urb_ctl) failed %d\n", 332 332 __func__, error); 333 333 } ··· 341 341 const int status = urb->status; 342 342 int error; 343 343 344 - dev_dbg(&urb->dev->dev, "### URB IRQ: [0x%02x 0x%02x 0x%02x 0x%02x] keybit=0x%02x\n", 344 + dev_dbg(&dev->intf->dev, "### URB IRQ: [0x%02x 0x%02x 0x%02x 0x%02x] keybit=0x%02x\n", 345 345 dev->irq_data->byte[0], 346 346 dev->irq_data->byte[1], 347 347 dev->irq_data->byte[2], ··· 351 351 if (status) { 352 352 if (status == -ESHUTDOWN) 353 353 return; 354 - dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status); 354 + dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); 355 355 } 356 356 357 357 /* Special keys */ ··· 398 398 399 399 error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); 400 400 if (error) 401 - dev_err(&dev->idev->dev, 401 + dev_err(&dev->intf->dev, 402 402 "%s: usb_submit_urb (urb_ctl) failed %d\n", 403 403 __func__, error); 404 404 } ··· 412 412 const int status = urb->status; 413 413 int error; 414 414 415 - dev_dbg(&urb->dev->dev, "### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]\n", 415 + dev_dbg(&dev->intf->dev, "### URB CTL: [0x%02x 0x%02x 0x%02x 0x%02x]\n", 416 416 dev->ctl_data->byte[0], 417 417 dev->ctl_data->byte[1], 418 418 dev->ctl_data->byte[2], 419 419 dev->ctl_data->byte[3]); 420 420 421 421 if (status) 422 - dev_err(&dev->idev->dev, "%s: urb status %d\n", __func__, status); 422 + dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status); 423 423 424 424 spin_lock(&dev->ctl_submit_lock); 425 425 ··· 436 436 dev->irq_urb_pending = 1; 437 437 error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC); 438 438 if (error) 439 - dev_err(&dev->idev->dev, 439 + dev_err(&dev->intf->dev, 440 440 "%s: usb_submit_urb (urb_irq) failed %d\n", 441 441 __func__, error); 442 442 } ··· 480 480 dev->ctl_data, 481 481 USB_PKT_LEN, USB_CTRL_SET_TIMEOUT); 482 482 if (error < 0 && error != -EINTR) 483 - dev_err(&dev->idev->dev, "%s: usb_control_msg() failed %d\n", 483 + dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n", 484 484 __func__, error); 485 485 } 486 486 ··· 542 542 543 543 error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL); 544 544 if (error) 545 - dev_err(&idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", 545 + dev_err(&dev->intf->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n", 546 546 __func__, error); 547 547 else 548 548 dev->open = 1; ··· 579 579 { 580 580 struct cm109_dev *dev = input_get_drvdata(idev); 581 581 582 - dev_dbg(&dev->udev->dev, 582 + dev_dbg(&dev->intf->dev, 583 583 "input_ev: type=%u code=%u value=%d\n", type, code, value); 584 584 585 585 if (type != EV_SND)