Root/
1 | #include <linux/kernel.h> |
2 | #include <linux/export.h> |
3 | #include <linux/ide.h> |
4 | #include <linux/seq_file.h> |
5 | |
6 | #include "ide-floppy.h" |
7 | |
8 | static int idefloppy_capacity_proc_show(struct seq_file *m, void *v) |
9 | { |
10 | ide_drive_t*drive = (ide_drive_t *)m->private; |
11 | |
12 | seq_printf(m, "%llu\n", (long long)ide_gd_capacity(drive)); |
13 | return 0; |
14 | } |
15 | |
16 | static int idefloppy_capacity_proc_open(struct inode *inode, struct file *file) |
17 | { |
18 | return single_open(file, idefloppy_capacity_proc_show, PDE(inode)->data); |
19 | } |
20 | |
21 | static const struct file_operations idefloppy_capacity_proc_fops = { |
22 | .owner = THIS_MODULE, |
23 | .open = idefloppy_capacity_proc_open, |
24 | .read = seq_read, |
25 | .llseek = seq_lseek, |
26 | .release = single_release, |
27 | }; |
28 | |
29 | ide_proc_entry_t ide_floppy_proc[] = { |
30 | { "capacity", S_IFREG|S_IRUGO, &idefloppy_capacity_proc_fops }, |
31 | { "geometry", S_IFREG|S_IRUGO, &ide_geometry_proc_fops }, |
32 | {} |
33 | }; |
34 | |
35 | ide_devset_rw_field(bios_cyl, bios_cyl); |
36 | ide_devset_rw_field(bios_head, bios_head); |
37 | ide_devset_rw_field(bios_sect, bios_sect); |
38 | ide_devset_rw_field(ticks, pc_delay); |
39 | |
40 | const struct ide_proc_devset ide_floppy_settings[] = { |
41 | IDE_PROC_DEVSET(bios_cyl, 0, 1023), |
42 | IDE_PROC_DEVSET(bios_head, 0, 255), |
43 | IDE_PROC_DEVSET(bios_sect, 0, 63), |
44 | IDE_PROC_DEVSET(ticks, 0, 255), |
45 | { NULL }, |
46 | }; |
47 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9