summaryrefslogtreecommitdiff
path: root/drivers/staging/speakup
diff options
context:
space:
mode:
authorChristopher Brannon <cmbrannon79@gmail.com>2010-10-15 04:23:55 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-15 23:22:37 +0400
commit75d6282d8b2d58b4722e63225f3951e1c9b0ebf8 (patch)
tree2b446fff03ac26e84fb8dce12ed04d8e58109ba9 /drivers/staging/speakup
parent9d096afa060935f1ecf04ef2d7534e0b0d94ac9d (diff)
downloadlinux-75d6282d8b2d58b4722e63225f3951e1c9b0ebf8.tar.xz
staging: speakup: speakup_keypc.c: style fixes
* Clean this file based on reports from checkpatch.pl. * Eliminate the unused synth_readable macro. * Convert function-like macros to inline functions. Signed-off-by: Christopher Brannon <chris@the-brannons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r--drivers/staging/speakup/speakup_keypc.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
index 0f18ec01425a..496e01481f9e 100644
--- a/drivers/staging/speakup/speakup_keypc.c
+++ b/drivers/staging/speakup/speakup_keypc.c
@@ -33,9 +33,6 @@
#define DRV_VERSION "2.10"
#define SYNTH_IO_EXTENT 0x04
#define SWAIT udelay(70)
-#define synth_writable() (inb_p(synth_port + UART_RX) & 0x10)
-#define synth_readable() (inb_p(synth_port + UART_RX) & 0x10)
-#define synth_full() ((inb_p(synth_port + UART_RX) & 0x80) == 0)
#define PROCSPEECH 0x1f
#define SYNTH_CLEAR 0x03
@@ -50,11 +47,11 @@ static int port_forced;
static unsigned int synth_portlist[] = { 0x2a8, 0 };
static struct var_t vars[] = {
- { CAPS_START, .u.s = {"[f130]" }},
- { CAPS_STOP, .u.s = {"[f90]" }},
- { RATE, .u.n = {"\04%c ", 8, 0, 10, 81, -8, NULL }},
- { PITCH, .u.n = {"[f%d]", 5, 0, 9, 40, 10, NULL }},
- { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL }},
+ { CAPS_START, .u.s = {"[f130]" } },
+ { CAPS_STOP, .u.s = {"[f90]" } },
+ { RATE, .u.n = {"\04%c ", 8, 0, 10, 81, -8, NULL } },
+ { PITCH, .u.n = {"[f%d]", 5, 0, 9, 40, 10, NULL } },
+ { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } },
V_LAST_VAR
};
@@ -133,6 +130,16 @@ static struct spk_synth synth_keypc = {
},
};
+static inline bool synth_writable(void)
+{
+ return (inb_p(synth_port + UART_RX) & 0x10) != 0;
+}
+
+static inline bool synth_full(void)
+{
+ return (inb_p(synth_port + UART_RX) & 0x80) == 0;
+}
+
static char *oops(void)
{
int s1, s2, s3, s4;
@@ -271,8 +278,9 @@ static int synth_probe(struct spk_synth *synth)
for (i = 0; synth_portlist[i]; i++) {
if (synth_request_region(synth_portlist[i],
SYNTH_IO_EXTENT)) {
- pr_warn("request_region: failed with 0x%x, %d\n",
- synth_portlist[i], SYNTH_IO_EXTENT);
+ pr_warn
+ ("request_region: failed with 0x%x, %d\n",
+ synth_portlist[i], SYNTH_IO_EXTENT);
continue;
}
port_val = inb(synth_portlist[i]);