Commit bf4a4bac authored by Christopher Brannon's avatar Christopher Brannon Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristopher Brannon <chris@the-brannons.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 73f12e8d
Loading
Loading
Loading
Loading
+20 −12
Original line number Diff line number Diff line
@@ -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);
@@ -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,7 +273,8 @@ 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",
				pr_warn
				    ("request_region: failed with 0x%x, %d\n",
				     synth_portlist[i], SYNTH_IO_EXTENT);
				continue;
			}