summaryrefslogtreecommitdiff
path: root/include/linux/input.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-05-07 08:17:28 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-07 08:17:28 -0700
commitbd1f184d1f44fd6aadc8f5d84da348a885f872d1 (patch)
tree72637b9094215c959bf5f4fd109c03d6b21d8803 /include/linux/input.h
parent2e493e2a0af3f3aa353644c641ad8b2663598153 (diff)
[PATCH] devfs: API changes
From: Christoph Hellwig <hch@lst.de> Some people may already have noticed that I've been revamping the devfs API recently. The worst offender still left is devfs_register, it's prototype is: devfs_handle_t devfs_register(devfs_handle_t dir, const char *name, unsigned int flags, unsigned int major, unsigned int minor, umode_t mode, void *ops, void *info) Of these: - dir and flags are always zero - the return value is never used - info is only used in one driver which doesn't even need it for operation - umode_t always describes a character device - name very often comes from a stack buffer we sprintf'ed into so obviously we really want a much simpler API instead. My first draft for this was: int devfs_mk_cdev(dev_t dev, umode_t mode, struct file_operations *fops, void *info, const char *fmt, ...) this removes the unused argumens, switches to a proper dev_t for the device number and allows to directly use a printf-like expression as name, getting rid of the temporary buffers. Now Al has reappeared and put the first steps of his CIDR for charater device on public ftp and we'll soon have a similar lookup object + fops mechanism in generic code as we already habe for blockdevices, i.e. the devfs code to assign fops from an entry will become superflous as generic code already does it. That means the fops and info arguments are obsolete before they were introduced, so I'd like to propose the following API instead: int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) which is much nicer anyway. The educated reader will notice that this is exactly the same prototype devfs_mk_bdev has so I'll probably get suggestions to merge those two into some kind of devfs_mk_node soon. Personally I don't like that as character and blockdevices are two really separate entinities and I'll like to keep them as separate as possible. Example patch that introduces the API and converts drivers/input attached. Every driver which calls devfs_mk_cdev (about 50) needs conversion. Note that the transition can happen in pieces - devfs_register continues to work after this patch, it's just the plan to get rid of it in the end.
Diffstat (limited to 'include/linux/input.h')
-rw-r--r--include/linux/input.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/linux/input.h b/include/linux/input.h
index 9df2e226a1f2..ae71e3ea453e 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -894,9 +894,6 @@ void input_close_device(struct input_handle *);
int input_accept_process(struct input_handle *handle, struct file *file);
int input_flush_device(struct input_handle* handle, struct file* file);
-/* will go away once devfs_register gets sanitized */
-void input_register_minor(char *name, int minor, int minor_base);
-
void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
#define input_report_key(a,b,c) input_event(a, EV_KEY, b, !!(c))