diff options
author | Christopher Brannon <cmbrannon79@gmail.com> | 2010-10-14 19:23:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-15 12:22:35 -0700 |
commit | bf4a4bacb051c278cca819600ecb4ab3f0902f17 (patch) | |
tree | be910fa284abb0cbef5c8e771649b6401c3da4b4 /drivers/staging/speakup | |
parent | 73f12e8d3d94828b9efe2b8b8a34b4ad6d14ee47 (diff) | |
download | kernel_samsung_tuna-bf4a4bacb051c278cca819600ecb4ab3f0902f17.zip kernel_samsung_tuna-bf4a4bacb051c278cca819600ecb4ab3f0902f17.tar.gz kernel_samsung_tuna-bf4a4bacb051c278cca819600ecb4ab3f0902f17.tar.bz2 |
staging: speakup: speakup_acntpc.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_acntpc.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c index d2660e2..bbe28b6 100644 --- a/drivers/staging/speakup/speakup_acntpc.c +++ b/drivers/staging/speakup/speakup_acntpc.c @@ -35,9 +35,6 @@ #include "speakup_acnt.h" /* local header file for Accent values */ #define DRV_VERSION "2.10" -#define synth_readable() (inb_p(synth_port_control) & SYNTH_READABLE) -#define synth_writable() (inb_p(synth_port_control) & SYNTH_WRITABLE) -#define synth_full() (inb_p(speakup_info.port_tts + UART_RX) == 'F') #define PROCSPEECH '\r' static int synth_probe(struct spk_synth *synth); @@ -51,13 +48,13 @@ static int port_forced; static unsigned int synth_portlist[] = { 0x2a8, 0 }; static struct var_t vars[] = { - { CAPS_START, .u.s = {"\033P8" }}, - { CAPS_STOP, .u.s = {"\033P5" }}, - { RATE, .u.n = {"\033R%c", 9, 0, 17, 0, 0, "0123456789abcdefgh" }}, - { PITCH, .u.n = {"\033P%d", 5, 0, 9, 0, 0, NULL }}, - { VOL, .u.n = {"\033A%d", 5, 0, 9, 0, 0, NULL }}, - { TONE, .u.n = {"\033V%d", 5, 0, 9, 0, 0, NULL }}, - { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL }}, + { CAPS_START, .u.s = {"\033P8" } }, + { CAPS_STOP, .u.s = {"\033P5" } }, + { RATE, .u.n = {"\033R%c", 9, 0, 17, 0, 0, "0123456789abcdefgh" } }, + { PITCH, .u.n = {"\033P%d", 5, 0, 9, 0, 0, NULL } }, + { VOL, .u.n = {"\033A%d", 5, 0, 9, 0, 0, NULL } }, + { TONE, .u.n = {"\033V%d", 5, 0, 9, 0, 0, NULL } }, + { DIRECT, .u.n = {NULL, 0, 0, 1, 0, 0, NULL } }, V_LAST_VAR }; @@ -142,6 +139,16 @@ static struct spk_synth synth_acntpc = { }, }; +static inline bool synth_writable(void) +{ + return inb_p(synth_port_control) & SYNTH_WRITABLE; +} + +static inline bool synth_full(void) +{ + return inb_p(speakup_info.port_tts + UART_RX) == 'F'; +} + static const char *synth_immediate(struct spk_synth *synth, const char *buf) { u_char ch; @@ -266,8 +273,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 = inw(synth_portlist[i]) & 0xfffc; |