aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBrandon Stewart <stewartb2@gmail.com>2014-01-27 20:43:17 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-03-06 23:53:13 -0500
commit74e7cd432c3d1641df4c88666cc427b03495673b (patch)
tree247a4ef6e992ec1781ad9076a2a1bcdcfb8d7476 /drivers
parent9ac8cde938481cd0e3f700b8f071c4eca989c9f6 (diff)
macintosh/adb: Fixed some coding style problems
Signed-off-by: Brandon Stewart <stewartb2@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/adb.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 04a50498f257..53611de7a457 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -38,7 +38,7 @@
38#include <linux/platform_device.h> 38#include <linux/platform_device.h>
39#include <linux/mutex.h> 39#include <linux/mutex.h>
40 40
41#include <asm/uaccess.h> 41#include <linux/uaccess.h>
42#ifdef CONFIG_PPC 42#ifdef CONFIG_PPC
43#include <asm/prom.h> 43#include <asm/prom.h>
44#include <asm/machdep.h> 44#include <asm/machdep.h>
@@ -193,8 +193,7 @@ static int adb_scan_bus(void)
193 break; 193 break;
194 194
195 noMovement = 0; 195 noMovement = 0;
196 } 196 } else {
197 else {
198 /* 197 /*
199 * No devices left at address i; move the 198 * No devices left at address i; move the
200 * one(s) we moved to `highFree' back to i. 199 * one(s) we moved to `highFree' back to i.
@@ -502,7 +501,7 @@ void
502adb_input(unsigned char *buf, int nb, int autopoll) 501adb_input(unsigned char *buf, int nb, int autopoll)
503{ 502{
504 int i, id; 503 int i, id;
505 static int dump_adb_input = 0; 504 static int dump_adb_input;
506 unsigned long flags; 505 unsigned long flags;
507 506
508 void (*handler)(unsigned char *, int, int); 507 void (*handler)(unsigned char *, int, int);
@@ -624,8 +623,7 @@ do_adb_query(struct adb_request *req)
624{ 623{
625 int ret = -EINVAL; 624 int ret = -EINVAL;
626 625
627 switch(req->data[1]) 626 switch(req->data[1]) {
628 {
629 case ADB_QUERY_GETDEVINFO: 627 case ADB_QUERY_GETDEVINFO:
630 if (req->nbytes < 3) 628 if (req->nbytes < 3)
631 break; 629 break;
@@ -697,7 +695,7 @@ static ssize_t adb_read(struct file *file, char __user *buf,
697 int ret = 0; 695 int ret = 0;
698 struct adbdev_state *state = file->private_data; 696 struct adbdev_state *state = file->private_data;
699 struct adb_request *req; 697 struct adb_request *req;
700 DECLARE_WAITQUEUE(wait,current); 698 DECLARE_WAITQUEUE(wait, current);
701 unsigned long flags; 699 unsigned long flags;
702 700
703 if (count < 2) 701 if (count < 2)
@@ -794,8 +792,8 @@ static ssize_t adb_write(struct file *file, const char __user *buf,
794 } 792 }
795 /* Special case for ADB_BUSRESET request, all others are sent to 793 /* Special case for ADB_BUSRESET request, all others are sent to
796 the controller */ 794 the controller */
797 else if ((req->data[0] == ADB_PACKET)&&(count > 1) 795 else if ((req->data[0] == ADB_PACKET) && (count > 1)
798 &&(req->data[1] == ADB_BUSRESET)) { 796 && (req->data[1] == ADB_BUSRESET)) {
799 ret = do_adb_reset_bus(); 797 ret = do_adb_reset_bus();
800 up(&adb_probe_mutex); 798 up(&adb_probe_mutex);
801 atomic_dec(&state->n_pending); 799 atomic_dec(&state->n_pending);