aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape_class.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/s390/char/tape_class.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/s390/char/tape_class.h')
-rw-r--r--drivers/s390/char/tape_class.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/s390/char/tape_class.h b/drivers/s390/char/tape_class.h
new file mode 100644
index 000000000000..33133ad00ba2
--- /dev/null
+++ b/drivers/s390/char/tape_class.h
@@ -0,0 +1,61 @@
1/*
2 * (C) Copyright IBM Corp. 2004 All Rights Reserved.
3 * tape_class.h ($Revision: 1.4 $)
4 *
5 * Tape class device support
6 *
7 * Author: Stefan Bader <shbader@de.ibm.com>
8 * Based on simple class device code by Greg K-H
9 */
10#ifndef __TAPE_CLASS_H__
11#define __TAPE_CLASS_H__
12
13#include <linux/init.h>
14#include <linux/module.h>
15#include <linux/fs.h>
16#include <linux/major.h>
17#include <linux/kobject.h>
18#include <linux/kobj_map.h>
19#include <linux/cdev.h>
20
21#include <linux/device.h>
22#include <linux/kdev_t.h>
23
24#define TAPECLASS_NAME_LEN 32
25
26struct tape_class_device {
27 struct cdev * char_device;
28 struct class_device * class_device;
29 char device_name[TAPECLASS_NAME_LEN];
30 char mode_name[TAPECLASS_NAME_LEN];
31};
32
33/*
34 * Register a tape device and return a pointer to the tape class device
35 * created by the call.
36 *
37 * device
38 * The pointer to the struct device of the physical (base) device.
39 * dev
40 * The intended major/minor number. The major number may be 0 to
41 * get a dynamic major number.
42 * fops
43 * The pointer to the drivers file operations for the tape device.
44 * device_name
45 * Pointer to the logical device name (will also be used as kobject name
46 * of the cdev). This can also be called the name of the tape class
47 * device.
48 * mode_name
49 * Points to the name of the tape mode. This creates a link with that
50 * name from the physical device to the logical device (class).
51 */
52struct tape_class_device *register_tape_dev(
53 struct device * device,
54 dev_t dev,
55 struct file_operations *fops,
56 char * device_name,
57 char * node_name
58);
59void unregister_tape_dev(struct tape_class_device *tcd);
60
61#endif /* __TAPE_CLASS_H__ */