[alsa-devel] [PATCH 2/2] ALSA: sound_firmware: fix style issues

Daniel Mack zonque at gmail.com
Thu Jun 5 14:12:26 CEST 2014


Fix some style issues in sound/sound_firmware.c. No functional change.

Signed-off-by: Daniel Mack <zonque at gmail.com>
---
 sound/sound_firmware.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/sound/sound_firmware.c b/sound/sound_firmware.c
index b155137..247858d 100644
--- a/sound/sound_firmware.c
+++ b/sound/sound_firmware.c
@@ -4,46 +4,47 @@
 #include <linux/file.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include "oss/sound_firmware.h"
 
 static int do_mod_firmware_load(const char *fn, char **fp)
 {
-	struct file* filp;
+	struct file *filp;
 	long l;
 	char *dp;
 	loff_t pos;
 
 	filp = filp_open(fn, 0, 0);
-	if (IS_ERR(filp))
-	{
+	if (IS_ERR(filp)) {
 		printk(KERN_INFO "Unable to load '%s'.\n", fn);
 		return 0;
 	}
+
 	l = i_size_read(file_inode(filp));
-	if (l <= 0 || l > 131072)
-	{
+	if (l <= 0 || l > 131072) {
 		printk(KERN_INFO "Invalid firmware '%s'\n", fn);
 		fput(filp);
 		return 0;
 	}
+
 	dp = vmalloc(l);
-	if (dp == NULL)
-	{
+	if (dp == NULL) {
 		printk(KERN_INFO "Out of memory loading '%s'.\n", fn);
 		fput(filp);
 		return 0;
 	}
+
 	pos = 0;
-	if (vfs_read(filp, dp, l, &pos) != l)
-	{
+	if (vfs_read(filp, dp, l, &pos) != l) {
 		printk(KERN_INFO "Failed to read '%s'.\n", fn);
 		vfree(dp);
 		fput(filp);
 		return 0;
 	}
+
 	fput(filp);
 	*fp = dp;
+
 	return (int) l;
 }
 
@@ -63,7 +64,7 @@ static int do_mod_firmware_load(const char *fn, char **fp)
  *	Caution: This API is not recommended. Firmware should be loaded via
  *	request_firmware.
  */
- 
+
 int mod_firmware_load(const char *fn, char **fp)
 {
 	int r;
-- 
1.9.3



More information about the Alsa-devel mailing list