Re: [patch 3/7] staging: serial: add spk_io_ops struct to spk_synth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



okash.khawaja@xxxxxxxxx, on sam. 11 mars 2017 13:05:27 +0000, wrote:
> This patch adds spk_io_ops struct which contain those methods whose job is to
> +static int spk_serial_out(struct spk_synth *in_synth, const char ch);
> +struct spk_io_ops serial_io_ops = {
> +	.synth_out = spk_serial_out,
> +};
> +EXPORT_SYMBOL_GPL(serial_io_ops);

Prefix it with spk_, to avoid naming clashes with other drivers.

> @@ -130,6 +136,15 @@
>  	outb(1, speakup_info.port_tts + UART_FCR);	/* Turn FIFO On */
>  }
>  
> +static int spk_serial_out(struct spk_synth *in_synth, const char ch)
> +{
> +	if (in_synth->alive && spk_wait_for_xmitr(in_synth)) {
> +		outb_p(ch, speakup_info.port_tts);
> +		return 1;
> +	}
> +	return 0;
> +}

Don't unnecessarily move the code, only drop the export symbol.

> -EXPORT_SYMBOL_GPL(spk_serial_out);



Apart from that, it's clean and nice :)

Samuel
_______________________________________________
Speakup mailing list
Speakup@xxxxxxxxxxxxxxxxx
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux