#include <linux/errno.h> /* for -EBUSY */
#include <linux/ioport.h> /* for request_region */
#include <linux/delay.h> /* for loops_per_jiffy */
#include <linux/errno.h> /* for -EBUSY */
#include <linux/ioport.h> /* for request_region */
#include <linux/delay.h> /* for loops_per_jiffy */
#include <linux/init.h> /* for __init, module_{init,exit} */
#include <linux/poll.h> /* for POLLIN, etc. */
#include <linux/dtlk.h> /* local header file for DoubleTalk values */
#include <linux/init.h> /* for __init, module_{init,exit} */
#include <linux/poll.h> /* for POLLIN, etc. */
#include <linux/dtlk.h> /* local header file for DoubleTalk values */
size_t nbytes, loff_t * ppos);
static unsigned int dtlk_poll(struct file *, poll_table *);
static int dtlk_open(struct inode *, struct file *);
size_t nbytes, loff_t * ppos);
static unsigned int dtlk_poll(struct file *, poll_table *);
static int dtlk_open(struct inode *, struct file *);
static int dtlk_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
static int dtlk_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
static int dtlk_dev_probe(void);
static struct dtlk_settings *dtlk_interrogate(void);
static int dtlk_readable(void);
static int dtlk_dev_probe(void);
static struct dtlk_settings *dtlk_interrogate(void);
static int dtlk_readable(void);
size_t count, loff_t * ppos)
{
int i = 0, retries = 0, ch;
size_t count, loff_t * ppos)
{
int i = 0, retries = 0, ch;
rate to 500 bytes/sec, but that's
still enough to keep up with the
speech synthesizer. */
rate to 500 bytes/sec, but that's
still enough to keep up with the
speech synthesizer. */
else {
/* the RDY bit goes zero 2-3 usec
after writing, and goes 1 again
else {
/* the RDY bit goes zero 2-3 usec
after writing, and goes 1 again
- if (copy_to_user((char *) arg, (char *) sp,
- sizeof(struct dtlk_settings)))
+ if (copy_to_user(argp, sp, sizeof(struct dtlk_settings)))
if (dtlk_dev_probe() == 0)
printk(", MAJOR %d\n", dtlk_major);
if (dtlk_dev_probe() == 0)
printk(", MAJOR %d\n", dtlk_major);
static void __exit dtlk_cleanup (void)
{
dtlk_write_bytes("goodbye", 8);
static void __exit dtlk_cleanup (void)
{
dtlk_write_bytes("goodbye", 8);
could be awakened
earlier by
signals... */
dtlk_write_tts(DTLK_CLEAR);
unregister_chrdev(dtlk_major, "dtlk");
could be awakened
earlier by
signals... */
dtlk_write_tts(DTLK_CLEAR);
unregister_chrdev(dtlk_major, "dtlk");
/* posting an index takes 18 msec. Here, we
wait up to 100 msec to see whether it
appears. */
/* posting an index takes 18 msec. Here, we
wait up to 100 msec to see whether it
appears. */
dtlk_has_indexing = dtlk_readable();
#ifdef TRACING
printk(", indexing %d\n", dtlk_has_indexing);
dtlk_has_indexing = dtlk_readable();
#ifdef TRACING
printk(", indexing %d\n", dtlk_has_indexing);