Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f37d8e8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

USB: cm109.c: remove err() usage



err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Axel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9cb757bf
Loading
Loading
Loading
Loading
+17 −10
Original line number Original line Diff line number Diff line
@@ -327,7 +327,9 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev)


	error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
	error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
	if (error)
	if (error)
		err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error);
		dev_err(&dev->intf->dev,
			"%s: usb_submit_urb (urb_ctl) failed %d\n",
			__func__, error);
}
}


/*
/*
@@ -349,7 +351,7 @@ static void cm109_urb_irq_callback(struct urb *urb)
	if (status) {
	if (status) {
		if (status == -ESHUTDOWN)
		if (status == -ESHUTDOWN)
			return;
			return;
		err("%s: urb status %d", __func__, status);
		dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status);
	}
	}


	/* Special keys */
	/* Special keys */
@@ -396,7 +398,8 @@ static void cm109_urb_irq_callback(struct urb *urb)


		error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
		error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC);
		if (error)
		if (error)
			err("%s: usb_submit_urb (urb_ctl) failed %d",
			dev_err(&dev->intf->dev,
				"%s: usb_submit_urb (urb_ctl) failed %d\n",
				__func__, error);
				__func__, error);
	}
	}


@@ -416,7 +419,7 @@ static void cm109_urb_ctl_callback(struct urb *urb)
	     dev->ctl_data->byte[3]);
	     dev->ctl_data->byte[3]);


	if (status)
	if (status)
		err("%s: urb status %d", __func__, status);
		dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status);


	spin_lock(&dev->ctl_submit_lock);
	spin_lock(&dev->ctl_submit_lock);


@@ -433,7 +436,8 @@ static void cm109_urb_ctl_callback(struct urb *urb)
			dev->irq_urb_pending = 1;
			dev->irq_urb_pending = 1;
			error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC);
			error = usb_submit_urb(dev->urb_irq, GFP_ATOMIC);
			if (error)
			if (error)
				err("%s: usb_submit_urb (urb_irq) failed %d",
				dev_err(&dev->intf->dev,
					"%s: usb_submit_urb (urb_irq) failed %d\n",
					__func__, error);
					__func__, error);
		}
		}
	}
	}
@@ -476,7 +480,8 @@ static void cm109_toggle_buzzer_sync(struct cm109_dev *dev, int on)
				dev->ctl_data,
				dev->ctl_data,
				USB_PKT_LEN, USB_CTRL_SET_TIMEOUT);
				USB_PKT_LEN, USB_CTRL_SET_TIMEOUT);
	if (error < 0 && error != -EINTR)
	if (error < 0 && error != -EINTR)
		err("%s: usb_control_msg() failed %d", __func__, error);
		dev_err(&dev->intf->dev, "%s: usb_control_msg() failed %d\n",
			__func__, error);
}
}


static void cm109_stop_traffic(struct cm109_dev *dev)
static void cm109_stop_traffic(struct cm109_dev *dev)
@@ -518,7 +523,7 @@ static int cm109_input_open(struct input_dev *idev)


	error = usb_autopm_get_interface(dev->intf);
	error = usb_autopm_get_interface(dev->intf);
	if (error < 0) {
	if (error < 0) {
		err("%s - cannot autoresume, result %d",
		dev_err(&idev->dev, "%s - cannot autoresume, result %d\n",
			__func__, error);
			__func__, error);
		return error;
		return error;
	}
	}
@@ -537,7 +542,8 @@ static int cm109_input_open(struct input_dev *idev)


	error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL);
	error = usb_submit_urb(dev->urb_ctl, GFP_KERNEL);
	if (error)
	if (error)
		err("%s: usb_submit_urb (urb_ctl) failed %d", __func__, error);
		dev_err(&idev->dev, "%s: usb_submit_urb (urb_ctl) failed %d\n",
			__func__, error);
	else
	else
		dev->open = 1;
		dev->open = 1;


@@ -710,7 +716,8 @@ static int cm109_usb_probe(struct usb_interface *intf,
	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
	pipe = usb_rcvintpipe(udev, endpoint->bEndpointAddress);
	ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
	ret = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
	if (ret != USB_PKT_LEN)
	if (ret != USB_PKT_LEN)
		err("invalid payload size %d, expected %d", ret, USB_PKT_LEN);
		dev_err(&intf->dev, "invalid payload size %d, expected %d\n",
			ret, USB_PKT_LEN);


	/* initialise irq urb */
	/* initialise irq urb */
	usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data,
	usb_fill_int_urb(dev->urb_irq, udev, pipe, dev->irq_data,