@@ -854,7 +854,6 @@ static void redrat3_led_complete(struct urb *urb)
static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3)
{
- struct device *dev = rr3->dev;
struct rc_dev *rc;
int ret;
u16 prod = le16_to_cpu(rr3->udev->descriptor.idProduct);
@@ -873,7 +872,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3)
rc->input_name = rr3->name;
rc->input_phys = rr3->phys;
usb_to_input_id(rr3->udev, &rc->input_id);
- rc->dev.parent = dev;
+ rc->dev.parent = rr3->dev;
rc->priv = rr3;
rc->driver_type = RC_DRIVER_IR_RAW;
rc->allowed_protocols = RC_BIT_ALL;
@@ -889,7 +888,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3)
ret = rc_register_device(rc);
if (ret < 0) {
- dev_err(dev, "remote dev registration failed\n");
+ dev_err(rr3->dev, "remote dev registration failed\n");
goto out;
}