1
2
3
4
5
6
7
8
9
10
11 #ifdef __KERNEL__
12 #define x(a) st_ ## a
13 #define y enum
14 #else
15 #define x(a) #a
16 #define y char * stats_name[] =
17 #endif
18
19 y {x(interrupt), x(data_ready), x(fifo_overflow), x(data_error),
20 x(crc_error), x(sync_error), x(lost_intr), x(echo),
21 x(write_timeout), x(receive_timeout), x(read_timeout),
22 x(dsb_timeout), x(stop_0xff), x(back_read_timeout),
23 x(sector_transferred), x(read_restarted), x(read_background),
24 x(bh), x(open), x(ioctl_multisession)
25 #ifdef __KERNEL__
26 , x(last_entry)
27 #endif
28 };
29
30 #ifdef __KERNEL__
31 #define NR_STATS st_last_entry
32 #else
33 #define NR_STATS sizeof(stats_name)/sizeof(char*)
34 #endif