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

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: default avatarChristopher Brannon <chris@the-brannons.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9d096afa
Loading
Loading
Loading
Loading
+18 −10
Original line number Diff line number Diff line
@@ -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

@@ -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,7 +278,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;
			}