diff --git a/drivers/staging/line6/audio.c b/drivers/staging/line6/audio.c
index b1488d3..61db1f9 100644
--- a/drivers/staging/line6/audio.c
+++ b/drivers/staging/line6/audio.c
@@ -37,7 +37,9 @@
 	strcpy(card->id, line6->properties->id);
 	strcpy(card->driver, DRIVER_NAME);
 	strcpy(card->shortname, line6->properties->name);
-	sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name, dev_name(line6->ifcdev));	/* 80 chars - see asound.h */
+	/* longname is 80 chars - see asound.h */
+	sprintf(card->longname, "Line6 %s at USB %s", line6->properties->name,
+		dev_name(line6->ifcdev));
 	return 0;
 }
 
diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c
index 06a6db8..1e3bb14 100644
--- a/drivers/staging/line6/capture.c
+++ b/drivers/staging/line6/capture.c
@@ -164,15 +164,19 @@
 			       len * bytes_per_frame);
 			memcpy(runtime->dma_area, fbuf + len * bytes_per_frame,
 			       (frames - len) * bytes_per_frame);
-		} else
-			dev_err(line6pcm->line6->ifcdev, "driver bug: len = %d\n", len);	/* this is somewhat paranoid */
+		} else {
+			/* this is somewhat paranoid */
+			dev_err(line6pcm->line6->ifcdev,
+				"driver bug: len = %d\n", len);
+		}
 	} else {
 		/* copy single chunk */
 		memcpy(runtime->dma_area +
 		       line6pcm->pos_in_done * bytes_per_frame, fbuf, fsize);
 	}
 
-	if ((line6pcm->pos_in_done += frames) >= runtime->buffer_size)
+	line6pcm->pos_in_done += frames;
+	if (line6pcm->pos_in_done >= runtime->buffer_size)
 		line6pcm->pos_in_done -= runtime->buffer_size;
 }
 
@@ -181,15 +185,16 @@
 	struct snd_pcm_substream *substream =
 	    get_substream(line6pcm, SNDRV_PCM_STREAM_CAPTURE);
 
-	if ((line6pcm->bytes_in += length) >= line6pcm->period_in) {
+	line6pcm->bytes_in += length;
+	if (line6pcm->bytes_in >= line6pcm->period_in) {
 		line6pcm->bytes_in %= line6pcm->period_in;
 		snd_pcm_period_elapsed(substream);
 	}
 }
 
 /*
-  Callback for completed capture URB.
-*/
+ * Callback for completed capture URB.
+ */
 static void audio_in_callback(struct urb *urb)
 {
 	int i, index, length = 0, shutdown = 0;
diff --git a/drivers/staging/line6/config.h b/drivers/staging/line6/config.h
index adad130..f8a5149 100644
--- a/drivers/staging/line6/config.h
+++ b/drivers/staging/line6/config.h
@@ -18,9 +18,9 @@
 #endif
 
 
-/**
-   Development tools.
-*/
+/*
+ * Development tools.
+ */
 #define DO_DEBUG_MESSAGES    0
 #define DO_DUMP_URB_SEND     DO_DEBUG_MESSAGES
 #define DO_DUMP_URB_RECEIVE  DO_DEBUG_MESSAGES
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index c671427..ea9209d 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -634,8 +634,7 @@
 				"receiving status failed (error %d)\n", ret);
 			return ret;
 		}
-	}
-	while (status == 0xff);
+	} while (status == 0xff);
 
 	if (status != 0) {
 		dev_err(line6->ifcdev, "write failed (error %d)\n", ret);
@@ -667,7 +666,7 @@
 /*
 	No operation (i.e., unsupported).
 */
-ssize_t line6_nop_write(struct device * dev, struct device_attribute * attr,
+ssize_t line6_nop_write(struct device *dev, struct device_attribute *attr,
 			const char *buf, size_t count)
 {
 	return count;
@@ -677,7 +676,7 @@
 	"write" request on "raw" special file.
 */
 #ifdef CONFIG_LINE6_USB_RAW
-ssize_t line6_set_raw(struct device * dev, struct device_attribute * attr,
+ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr,
 		      const char *buf, size_t count)
 {
 	struct usb_interface *interface = to_usb_interface(dev);
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index 01fa27e..553192f 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -70,10 +70,12 @@
 		return err;	\
 } while (0)
 
-#define CHECK_STARTUP_PROGRESS(x, n)	   \
-	if((x) >= (n))			   \
-		return;			   \
-	x = (n);
+#define CHECK_STARTUP_PROGRESS(x, n)	\
+do {					\
+	if ((x) >= (n))			\
+		return;			\
+	x = (n);			\
+} while (0)
 
 extern const unsigned char line6_midi_id[3];
 extern struct usb_line6 *line6_devices[LINE6_MAX_DEVICES];
diff --git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c
index fffd805..4304dfe 100644
--- a/drivers/staging/line6/midi.c
+++ b/drivers/staging/line6/midi.c
@@ -380,8 +380,10 @@
 	int err;
 	struct snd_line6_midi *line6midi;
 
-	if (!(line6->properties->capabilities & LINE6_BIT_CONTROL))
-		return 0;	/* skip MIDI initialization and report success */
+	if (!(line6->properties->capabilities & LINE6_BIT_CONTROL)) {
+		/* skip MIDI initialization and report success */
+		return 0;
+	}
 
 	line6midi = kzalloc(sizeof(struct snd_line6_midi), GFP_KERNEL);
 
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 8fb5596..e54770e 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -361,9 +361,8 @@
 */
 static void pcm_disconnect_substream(struct snd_pcm_substream *substream)
 {
-	if (substream->runtime && snd_pcm_running(substream)) {
+	if (substream->runtime && snd_pcm_running(substream))
 		snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
-	}
 }
 
 /*
diff --git a/drivers/staging/line6/pcm.h b/drivers/staging/line6/pcm.h
index 3a50083..77055b3 100644
--- a/drivers/staging/line6/pcm.h
+++ b/drivers/staging/line6/pcm.h
@@ -45,7 +45,8 @@
 /*
 	Get substream from Line6 PCM data structure
 */
-#define get_substream(line6pcm, stream) (line6pcm->pcm->streams[stream].substream)
+#define get_substream(line6pcm, stream)	\
+		(line6pcm->pcm->streams[stream].substream)
 
 /*
 	PCM mode bits and masks.
@@ -312,13 +313,13 @@
 extern int line6_pcm_start(struct snd_line6_pcm *line6pcm, int channels);
 extern int line6_pcm_stop(struct snd_line6_pcm *line6pcm, int channels);
 
-#define PRINT_FRAME_DIFF(op) {																		\
-	static int diff_prev = 1000;																		\
+#define PRINT_FRAME_DIFF(op) {						\
+	static int diff_prev = 1000;					\
 	int diff = line6pcm->last_frame_out - line6pcm->last_frame_in;	\
-	if((diff != diff_prev) && (abs(diff) < 100)) {									\
-		printk("%s frame diff = %d\n", op, diff);											\
-		diff_prev = diff;																							\
-	}																																\
-	}
+	if ((diff != diff_prev) && (abs(diff) < 100)) {			\
+		printk(KERN_INFO "%s frame diff = %d\n", op, diff);	\
+		diff_prev = diff;					\
+	}								\
+}
 
 #endif
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c
index 39218d6..29940fd 100644
--- a/drivers/staging/line6/playback.c
+++ b/drivers/staging/line6/playback.c
@@ -165,9 +165,8 @@
 		struct usb_iso_packet_descriptor *fout =
 		    &urb_out->iso_frame_desc[i];
 
-		if (line6pcm->flags & MASK_CAPTURE) {
+		if (line6pcm->flags & MASK_CAPTURE)
 			fsize = line6pcm->prev_fsize;
-		}
 
 		if (fsize == 0) {
 			int n;
@@ -237,7 +236,8 @@
 #endif
 		}
 
-		if ((line6pcm->pos_out += urb_frames) >= runtime->buffer_size)
+		line6pcm->pos_out += urb_frames;
+		if (line6pcm->pos_out >= runtime->buffer_size)
 			line6pcm->pos_out -= runtime->buffer_size;
 	} else {
 		memset(urb_out->transfer_buffer, 0,
@@ -418,8 +418,8 @@
 		submit_audio_out_urb(line6pcm);
 
 		if (test_bit(BIT_PCM_ALSA_PLAYBACK, &line6pcm->flags)) {
-			if ((line6pcm->bytes_out +=
-			     length) >= line6pcm->period_out) {
+			line6pcm->bytes_out += length;
+			if (line6pcm->bytes_out >= line6pcm->period_out) {
 				line6pcm->bytes_out %= line6pcm->period_out;
 				snd_pcm_period_elapsed(substream);
 			}
diff --git a/drivers/staging/line6/playback.h b/drivers/staging/line6/playback.h
index c6f2a17..f2fc8c0 100644
--- a/drivers/staging/line6/playback.h
+++ b/drivers/staging/line6/playback.h
@@ -17,13 +17,14 @@
 #include "driver.h"
 
 /*
-  When the TonePort is used with jack in full duplex mode and the outputs are
-  not connected, the software monitor produces an ugly noise since everything
-  written to the output buffer (i.e., the input signal) will be repeated in the
-  next period (sounds like a delay effect). As a workaround, the output buffer
-  is cleared after the data have been read, but there must be a better
-  solution. Until one is found, this workaround can be used to fix the problem.
-*/
+ * When the TonePort is used with jack in full duplex mode and the outputs are
+ * not connected, the software monitor produces an ugly noise since everything
+ * written to the output buffer (i.e., the input signal) will be repeated in
+ * the next period (sounds like a delay effect). As a workaround, the output
+ * buffer is cleared after the data have been read, but there must be a better
+ * solution. Until one is found, this workaround can be used to fix the
+ * problem.
+ */
 #define USE_CLEAR_BUFFER_WORKAROUND 1
 
 extern struct snd_pcm_ops snd_line6_playback_ops;
diff --git a/drivers/staging/line6/pod.c b/drivers/staging/line6/pod.c
index e6a1c79..22e2ced 100644
--- a/drivers/staging/line6/pod.c
+++ b/drivers/staging/line6/pod.c
@@ -1242,35 +1242,29 @@
 
 	/* create sysfs entries: */
 	err = pod_create_files2(&interface->dev);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* initialize audio system: */
 	err = line6_init_audio(line6);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* initialize MIDI subsystem: */
 	err = line6_init_midi(line6);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* initialize PCM subsystem: */
 	err = line6_init_pcm(line6, &pod_pcm_properties);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* register monitor control: */
-	err =
-	    snd_ctl_add(line6->card,
-			snd_ctl_new1(&pod_control_monitor, line6->line6pcm));
-	if (err < 0) {
+	err = snd_ctl_add(line6->card,
+			  snd_ctl_new1(&pod_control_monitor, line6->line6pcm));
+	if (err < 0)
 		return err;
-	}
 
 	/*
 	   When the sound card is registered at this point, the PODxt Live
@@ -1295,9 +1289,8 @@
 {
 	int err = pod_try_init(interface, pod);
 
-	if (err < 0) {
+	if (err < 0)
 		pod_destruct(interface);
-	}
 
 	return err;
 }
@@ -1317,9 +1310,8 @@
 		struct snd_line6_pcm *line6pcm = pod->line6.line6pcm;
 		struct device *dev = &interface->dev;
 
-		if (line6pcm != NULL) {
+		if (line6pcm != NULL)
 			line6_pcm_disconnect(line6pcm);
-		}
 
 		if (dev != NULL) {
 			/* remove sysfs entries: */
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index d4ac734..6a10b0f 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -349,24 +349,20 @@
 
 	/* initialize audio system: */
 	err = line6_init_audio(line6);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* initialize PCM subsystem: */
 	err = line6_init_pcm(line6, &toneport_pcm_properties);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* register monitor control: */
-	err =
-	    snd_ctl_add(line6->card,
-			snd_ctl_new1(&toneport_control_monitor,
-				     line6->line6pcm));
-	if (err < 0) {
+	err = snd_ctl_add(line6->card,
+			  snd_ctl_new1(&toneport_control_monitor,
+				       line6->line6pcm));
+	if (err < 0)
 		return err;
-	}
 
 	/* register source select control: */
 	switch (usbdev->descriptor.idProduct) {
@@ -376,16 +372,14 @@
 		    snd_ctl_add(line6->card,
 				snd_ctl_new1(&toneport_control_source,
 					     line6->line6pcm));
-		if (err < 0) {
+		if (err < 0)
 			return err;
-		}
 	}
 
 	/* register audio system: */
 	err = line6_register_audio(line6);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	line6_read_serial_number(line6, &toneport->serial_number);
 	line6_read_data(line6, 0x80c2, &toneport->firmware_version, 1);
@@ -416,9 +410,8 @@
 {
 	int err = toneport_try_init(interface, toneport);
 
-	if (err < 0) {
+	if (err < 0)
 		toneport_destruct(interface);
-	}
 
 	return err;
 }
diff --git a/drivers/staging/line6/usbdefs.h b/drivers/staging/line6/usbdefs.h
index a8a43a2..c6dffe6 100644
--- a/drivers/staging/line6/usbdefs.h
+++ b/drivers/staging/line6/usbdefs.h
@@ -74,7 +74,9 @@
 /* device support hardware monitoring */
 #define LINE6_BIT_HWMON		(1 << 2)
 
-#define LINE6_BIT_CONTROL_PCM_HWMON (LINE6_BIT_CONTROL | LINE6_BIT_PCM | LINE6_BIT_HWMON)
+#define LINE6_BIT_CONTROL_PCM_HWMON	(LINE6_BIT_CONTROL |	\
+					 LINE6_BIT_PCM |	\
+					 LINE6_BIT_HWMON)
 
 #define LINE6_FALLBACK_INTERVAL		10
 #define LINE6_FALLBACK_MAXPACKETSIZE	16
diff --git a/drivers/staging/line6/variax.c b/drivers/staging/line6/variax.c
index 3a46104..894eee7 100644
--- a/drivers/staging/line6/variax.c
+++ b/drivers/staging/line6/variax.c
@@ -664,15 +664,13 @@
 
 	/* initialize audio system: */
 	err = line6_init_audio(&variax->line6);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* initialize MIDI subsystem: */
 	err = line6_init_midi(&variax->line6);
-	if (err < 0) {
+	if (err < 0)
 		return err;
-	}
 
 	/* initiate startup procedure: */
 	variax_startup1(variax);
@@ -687,9 +685,8 @@
 {
 	int err = variax_try_init(interface, variax);
 
-	if (err < 0) {
+	if (err < 0)
 		variax_destruct(interface);
-	}
 
 	return err;
 }
