|
Lines 81-99
Link Here
|
| 81 |
/* read */ noread, |
81 |
/* read */ noread, |
| 82 |
/* write */ nowrite, |
82 |
/* write */ nowrite, |
| 83 |
/* ioctl */ mydev_ioctl, |
83 |
/* ioctl */ mydev_ioctl, |
| 84 |
/* stop */ nostop, |
|
|
| 85 |
/* reset */ noreset, |
| 86 |
/* devtotty */ nodevtotty, |
| 87 |
/* poll */ nopoll, |
84 |
/* poll */ nopoll, |
| 88 |
/* mmap */ nommap, |
85 |
/* mmap */ nommap, |
| 89 |
/* strategy */ nostrategy, |
86 |
/* strategy */ nostrategy, |
| 90 |
/* name */ "cdev", |
87 |
/* name */ "cdev", |
| 91 |
/* parms */ noparms, |
|
|
| 92 |
/* maj */ CDEV_MAJOR, |
88 |
/* maj */ CDEV_MAJOR, |
| 93 |
/* dump */ nodump, |
89 |
/* dump */ nodump, |
| 94 |
/* psize */ nopsize, |
90 |
/* psize */ nopsize, |
| 95 |
/* flags */ D_TTY, |
91 |
/* flags */ D_TTY, |
| 96 |
/* maxio */ 0, |
|
|
| 97 |
/* bmaj */ -1 |
92 |
/* bmaj */ -1 |
| 98 |
}; |
93 |
}; |
| 99 |
|
94 |
|
|
Lines 123-128
Link Here
|
| 123 |
printf("Copyright (c) 1998\n"); |
118 |
printf("Copyright (c) 1998\n"); |
| 124 |
printf("Rajesh Vaidheeswarran\n"); |
119 |
printf("Rajesh Vaidheeswarran\n"); |
| 125 |
printf("All rights reserved\n"); |
120 |
printf("All rights reserved\n"); |
|
|
121 |
cdevsw_add(&my_devsw); |
| 126 |
break; /* Success*/ |
122 |
break; /* Success*/ |
| 127 |
|
123 |
|
| 128 |
case MOD_UNLOAD: |
124 |
case MOD_UNLOAD: |
|
Lines 139-142
Link Here
|
| 139 |
|
135 |
|
| 140 |
/* Now declare the module to the system */ |
136 |
/* Now declare the module to the system */ |
| 141 |
|
137 |
|
| 142 |
DEV_MODULE(cdev, CDEV_MAJOR, -1, my_devsw, cdev_load, 0); |
138 |
DEV_MODULE(cdev, cdev_load, 0); |