]> git.pld-linux.org Git - packages/lin_tape.git/blob - kernel-4.14.patch
- first part of kernel 4.14 fixes
[packages/lin_tape.git] / kernel-4.14.patch
1 --- lin_tape-3.0.20/fo_util.c~  2017-05-27 21:22:52.000000000 +0200
2 +++ lin_tape-3.0.20/fo_util.c   2017-11-17 09:04:43.375810976 +0100
3 @@ -169,7 +169,7 @@
4  
5  /** Enable the change of the debug control flag.
6   *  /sys/bus/scsi/drivers/pfo/debug_flag */
7 -static ssize_t pfoattr_debug_flag_set(struct device_driver *dev,
8 +static ssize_t debug_flag_store(struct device_driver *dev,
9                                         const char *buf, size_t count)
10  {
11         sscanf(buf, "0x%x", &pfo_debug_flag);
12 @@ -179,19 +179,18 @@
13  
14  /** Enable the cat of the debug control flag.
15   *  /sys/bus/scsi/drivers/pfo/debug_flag */
16 -static ssize_t pfoattr_debug_flag_get(struct device_driver *ddp, char *buf)
17 +static ssize_t debug_flag_show(struct device_driver *ddp, char *buf)
18  {
19         DBG_DEBUG("");
20         return scnprintf(buf, PAGE_SIZE,
21                 "debug flag=%04x\necho 0x<hexvalue> > debug_flag to change\n",
22                 pfo_debug_flag);
23  }
24 -static DRIVER_ATTR(debug_flag, S_IRUGO|S_IWUSR|S_IWGRP,
25 -                       pfoattr_debug_flag_get, pfoattr_debug_flag_set);
26 +static DRIVER_ATTR_RW(debug_flag);
27  
28  /** Enable the cat of the debug buffer.
29   *  /sys/bus/scsi/drivers/pfo/debug_buffer */
30 -static ssize_t pfoattr_debug_buffer_get(struct device_driver *ddp, char *buf)
31 +static ssize_t debug_buffer_show(struct device_driver *ddp, char *buf)
32  {
33         DBG_DEBUG("");
34         if (debug_buffer[0] == '\001') {
35 @@ -202,11 +201,11 @@
36                 return strlen(buf);
37         }
38  }
39 -static DRIVER_ATTR(debug_buffer, S_IRUGO, pfoattr_debug_buffer_get, NULL);
40 +static DRIVER_ATTR_RO(debug_buffer);
41  
42  /** Enable the cat of the trace buffer.
43   *  /sys/bus/scsi/drivers/pfo/trace */
44 -static ssize_t pfoattr_debug_trace_get(struct device_driver *ddp, char *buf)
45 +static ssize_t debug_trace_show(struct device_driver *ddp, char *buf)
46  {
47         char *the_buffer;
48         int strlenbuf = 0;
49 @@ -232,7 +231,7 @@
50         }
51         return strlenbuf;
52  }
53 -static DRIVER_ATTR(trace, S_IRUGO, pfoattr_debug_trace_get, NULL);
54 +static DRIVER_ATTR_RO(trace);
55  
56  int init_debug(struct device_driver *pfo_gendrv)
57  {
This page took 0.026536 seconds and 3 git commands to generate.