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

Commit 48049188 authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman
Browse files

staging: asus_oled: Remove superfluous loop



This patch removes a superfluous loop in asus_oled.c
The code is equivalent to do{...} while (0) and thus executes the code
exactly once -> so we can simply remove the loop.

Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ca7e782
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -159,7 +159,6 @@ static void setup_packet_header(struct asus_oled_packet *packet, char flags,

static void enable_oled(struct asus_oled_dev *odev, uint8_t enabl)
{
	int a;
	int retval;
	int act_len;
	struct asus_oled_packet *packet;
@@ -178,7 +177,6 @@ static void enable_oled(struct asus_oled_dev *odev, uint8_t enabl)
	else
		packet->bitmap[0] = 0xae;

	for (a = 0; a < 1; a++) {
	retval = usb_bulk_msg(odev->udev,
		usb_sndbulkpipe(odev->udev, 2),
		packet,
@@ -188,7 +186,6 @@ static void enable_oled(struct asus_oled_dev *odev, uint8_t enabl)

	if (retval)
		dev_dbg(&odev->udev->dev, "retval = %d\n", retval);
	}

	odev->enabled = enabl;