summaryrefslogtreecommitdiff
path: root/drivers/staging/asus_oled
diff options
context:
space:
mode:
authorPeter Huewe <peterhuewe@gmx.de>2012-02-25 01:19:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-29 15:43:21 -0800
commit480491889f684662a95234f2205ed4d70afe7a10 (patch)
tree04c9154004ffc575e5b4ee4c9988738116c27de7 /drivers/staging/asus_oled
parent1ca7e782864222bcdbe305e543df25df4e343963 (diff)
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: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/asus_oled')
-rw-r--r--drivers/staging/asus_oled/asus_oled.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/staging/asus_oled/asus_oled.c b/drivers/staging/asus_oled/asus_oled.c
index 1df9586f2730..83549d9cfefc 100644
--- a/drivers/staging/asus_oled/asus_oled.c
+++ b/drivers/staging/asus_oled/asus_oled.c
@@ -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,17 +177,15 @@ 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,
- sizeof(struct asus_oled_header) + 1,
- &act_len,
- -1);
+ retval = usb_bulk_msg(odev->udev,
+ usb_sndbulkpipe(odev->udev, 2),
+ packet,
+ sizeof(struct asus_oled_header) + 1,
+ &act_len,
+ -1);
- if (retval)
- dev_dbg(&odev->udev->dev, "retval = %d\n", retval);
- }
+ if (retval)
+ dev_dbg(&odev->udev->dev, "retval = %d\n", retval);
odev->enabled = enabl;