lkml.org 
[lkml]   [2010]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Staging: quickstart style fixes
Date
Fixed some style issues reported by checkpatch.pl

Signed-off-by: Gary Coulbourne <bear@bears.org>
---
drivers/staging/quickstart/quickstart.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/quickstart/quickstart.c b/drivers/staging/quickstart/quickstart.c
index d83bec8..e6b53b8 100644
--- a/drivers/staging/quickstart/quickstart.c
+++ b/drivers/staging/quickstart/quickstart.c
@@ -5,7 +5,7 @@
* Copyright (C) 2007-2010 Angelo Arrifano <miknix@gmail.com>
*
* Information gathered from disassebled dsdt and from here:
- * <http://www.microsoft.com/whdc/system/platform/firmware/DirAppLaunch.mspx>
+ * <http://www.microsoft.com/whdc/system/platform/firmware/DirAppLaunch.mspx>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -140,8 +140,12 @@ static ssize_t pressed_button_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
- return snprintf(buf, PAGE_SIZE, "%s\n",
- (quickstart_data.pressed?quickstart_data.pressed->name:"none"));
+ char *button_name = "none";
+
+ if (quickstart_data.pressed)
+ button_name = quickstart_data.pressed->name;
+
+ return snprintf(buf, PAGE_SIZE, "%s\n", button_name);
}


--
1.7.1


\
 
 \ /
  Last update: 2010-11-21 20:49    [W:0.043 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site