Commit 77491e52 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: line6: remove DEVICE_ATTRIBUTE

As the code is in the kernel tree, it's no longer needed.

Cc: Markus Grabner <grabner@icg.tugraz.at>
Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7e60fcb5
......@@ -43,16 +43,6 @@
#define CHECKPOINT printk("line6usb: %s (%s:%d)\n", __FUNCTION__, __FILE__, __LINE__)
#endif
/**
In Linux 2.6.13 and later, the device_attribute is passed to the sysfs
get/set functions (see /usr/src/linux/include/linux/device.h).
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
#define DEVICE_ATTRIBUTE struct device_attribute *attr,
#else
#define DEVICE_ATTRIBUTE
#endif
/**
In Linux 2.6.20 and later, the pt_regs is no longer passed to USB callback
functions.
......
......@@ -22,14 +22,16 @@
struct device_attribute dev_attr_##_name1 = __ATTR(_name2,_mode,_show,_store)
#define LINE6_PARAM_R(PREFIX, prefix, type, param) \
static ssize_t prefix ## _get_ ## param(struct device *dev, DEVICE_ATTRIBUTE char *buf) \
static ssize_t prefix ## _get_ ## param(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
return prefix ## _get_param_ ## type(dev, buf, PREFIX ## _ ## param); \
}
#define LINE6_PARAM_RW(PREFIX, prefix, type, param) \
LINE6_PARAM_R(PREFIX, prefix, type, param); \
static ssize_t prefix ## _set_ ## param(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count) \
static ssize_t prefix ## _set_ ## param(struct device *dev, \
struct device_attribute *attr, const char *buf, size_t count) \
{ \
return prefix ## _set_param_ ## type(dev, buf, count, PREFIX ## _ ## param); \
}
......
......@@ -556,7 +556,8 @@ int line6_read_serial_number(struct usb_line6 *line6, int *serial_number)
/*
No operation (i.e., unsupported).
*/
ssize_t line6_nop_read(struct device *dev, DEVICE_ATTRIBUTE char *buf)
ssize_t line6_nop_read(struct device *dev, struct device_attribute *attr,
char *buf)
{
return 0;
}
......@@ -564,7 +565,8 @@ ssize_t line6_nop_read(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
No operation (i.e., unsupported).
*/
ssize_t line6_nop_write(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
ssize_t line6_nop_write(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
return count;
}
......@@ -573,7 +575,8 @@ ssize_t line6_nop_write(struct device *dev, DEVICE_ATTRIBUTE const char *buf, si
"write" request on "raw" special file.
*/
#if CREATE_RAW_FILE
ssize_t line6_set_raw(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6 *line6 = usb_get_intfdata(interface);
......
......@@ -173,15 +173,15 @@ struct usb_line6 {
extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, int code2, int size);
extern ssize_t line6_nop_read(struct device *dev, DEVICE_ATTRIBUTE char *buf);
extern ssize_t line6_nop_write(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count);
extern ssize_t line6_nop_read(struct device *dev, struct device_attribute *attr, char *buf);
extern ssize_t line6_nop_write(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
extern int line6_read_data(struct usb_line6 *line6, int address, void *data, size_t datalen);
extern int line6_read_serial_number(struct usb_line6 *line6, int *serial_number);
extern int line6_send_program(struct usb_line6 *line6, int value);
extern int line6_send_raw_message(struct usb_line6 *line6, const char *buffer, int size);
extern int line6_send_raw_message_async(struct usb_line6 *line6, const char *buffer, int size);
extern int line6_send_sysex_message(struct usb_line6 *line6, const char *buffer, int size);
extern ssize_t line6_set_raw(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count);
extern ssize_t line6_set_raw(struct device *dev, struct device_attribute *attr, const char *buf, size_t count);
extern int line6_transmit_parameter(struct usb_line6 *line6, int param, int value);
extern int line6_write_data(struct usb_line6 *line6, int address, void *data, size_t datalen);
extern void line6_write_hexdump(struct usb_line6 *line6, char dir, const unsigned char *buffer, int size);
......
......@@ -287,7 +287,9 @@ static int snd_line6_new_midi(struct snd_line6_midi *line6midi)
/*
"read" request on "midi_mask_transmit" special file.
*/
static ssize_t midi_get_midi_mask_transmit(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t midi_get_midi_mask_transmit(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6 *line6 = usb_get_intfdata(interface);
......@@ -297,7 +299,9 @@ static ssize_t midi_get_midi_mask_transmit(struct device *dev, DEVICE_ATTRIBUTE
/*
"write" request on "midi_mask" special file.
*/
static ssize_t midi_set_midi_mask_transmit(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t midi_set_midi_mask_transmit(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6 *line6 = usb_get_intfdata(interface);
......@@ -309,7 +313,9 @@ static ssize_t midi_set_midi_mask_transmit(struct device *dev, DEVICE_ATTRIBUTE
/*
"read" request on "midi_mask_receive" special file.
*/
static ssize_t midi_get_midi_mask_receive(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t midi_get_midi_mask_receive(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6 *line6 = usb_get_intfdata(interface);
......@@ -319,7 +325,9 @@ static ssize_t midi_get_midi_mask_receive(struct device *dev, DEVICE_ATTRIBUTE c
/*
"write" request on "midi_mask" special file.
*/
static ssize_t midi_set_midi_mask_receive(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t midi_set_midi_mask_receive(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6 *line6 = usb_get_intfdata(interface);
......
......@@ -515,7 +515,8 @@ static ssize_t get_name_generic(struct usb_line6_pod *pod, const char *str, char
/*
"read" request on "channel" special file.
*/
static ssize_t pod_get_channel(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_channel(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -525,7 +526,9 @@ static ssize_t pod_get_channel(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "channel" special file.
*/
static ssize_t pod_set_channel(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_channel(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -537,7 +540,8 @@ static ssize_t pod_set_channel(struct device *dev, DEVICE_ATTRIBUTE const char *
/*
"read" request on "name" special file.
*/
static ssize_t pod_get_name(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_name(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -547,7 +551,8 @@ static ssize_t pod_get_name(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"read" request on "name" special file.
*/
static ssize_t pod_get_name_buf(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_name_buf(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -557,7 +562,8 @@ static ssize_t pod_get_name_buf(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"read" request on "dump" special file.
*/
static ssize_t pod_get_dump(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_dump(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -570,7 +576,8 @@ static ssize_t pod_get_dump(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "dump" special file.
*/
static ssize_t pod_set_dump(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_dump(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -662,7 +669,8 @@ static ssize_t pod_set_system_param(struct usb_line6_pod *pod, const char *buf,
/*
"read" request on "dump_buf" special file.
*/
static ssize_t pod_get_dump_buf(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_dump_buf(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -675,7 +683,9 @@ static ssize_t pod_get_dump_buf(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "dump_buf" special file.
*/
static ssize_t pod_set_dump_buf(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_dump_buf(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -694,7 +704,9 @@ static ssize_t pod_set_dump_buf(struct device *dev, DEVICE_ATTRIBUTE const char
/*
"write" request on "finish" special file.
*/
static ssize_t pod_set_finish(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_finish(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -709,7 +721,9 @@ static ssize_t pod_set_finish(struct device *dev, DEVICE_ATTRIBUTE const char *b
/*
"write" request on "store_channel" special file.
*/
static ssize_t pod_set_store_channel(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_store_channel(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return pod_send_store_command(dev, buf, count, 0x0000, 0x00c0);
}
......@@ -717,7 +731,9 @@ static ssize_t pod_set_store_channel(struct device *dev, DEVICE_ATTRIBUTE const
/*
"write" request on "store_effects_setup" special file.
*/
static ssize_t pod_set_store_effects_setup(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_store_effects_setup(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return pod_send_store_command(dev, buf, count, 0x0080, 0x0080);
}
......@@ -725,7 +741,9 @@ static ssize_t pod_set_store_effects_setup(struct device *dev, DEVICE_ATTRIBUTE
/*
"write" request on "store_amp_setup" special file.
*/
static ssize_t pod_set_store_amp_setup(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_store_amp_setup(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return pod_send_store_command(dev, buf, count, 0x0040, 0x0100);
}
......@@ -733,7 +751,9 @@ static ssize_t pod_set_store_amp_setup(struct device *dev, DEVICE_ATTRIBUTE cons
/*
"write" request on "retrieve_channel" special file.
*/
static ssize_t pod_set_retrieve_channel(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_retrieve_channel(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return pod_send_retrieve_command(dev, buf, count, 0x0000, 0x00c0);
}
......@@ -741,7 +761,9 @@ static ssize_t pod_set_retrieve_channel(struct device *dev, DEVICE_ATTRIBUTE con
/*
"write" request on "retrieve_effects_setup" special file.
*/
static ssize_t pod_set_retrieve_effects_setup(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_retrieve_effects_setup(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return pod_send_retrieve_command(dev, buf, count, 0x0080, 0x0080);
}
......@@ -749,7 +771,9 @@ static ssize_t pod_set_retrieve_effects_setup(struct device *dev, DEVICE_ATTRIBU
/*
"write" request on "retrieve_amp_setup" special file.
*/
static ssize_t pod_set_retrieve_amp_setup(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_retrieve_amp_setup(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
return pod_send_retrieve_command(dev, buf, count, 0x0040, 0x0100);
}
......@@ -757,7 +781,8 @@ static ssize_t pod_set_retrieve_amp_setup(struct device *dev, DEVICE_ATTRIBUTE c
/*
"read" request on "dirty" special file.
*/
static ssize_t pod_get_dirty(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_dirty(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -769,7 +794,9 @@ static ssize_t pod_get_dirty(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"read" request on "midi_postprocess" special file.
*/
static ssize_t pod_get_midi_postprocess(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_midi_postprocess(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -779,7 +806,9 @@ static ssize_t pod_get_midi_postprocess(struct device *dev, DEVICE_ATTRIBUTE cha
/*
"write" request on "midi_postprocess" special file.
*/
static ssize_t pod_set_midi_postprocess(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t pod_set_midi_postprocess(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -791,7 +820,8 @@ static ssize_t pod_set_midi_postprocess(struct device *dev, DEVICE_ATTRIBUTE con
/*
"read" request on "serial_number" special file.
*/
static ssize_t pod_get_serial_number(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_serial_number(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -801,7 +831,9 @@ static ssize_t pod_get_serial_number(struct device *dev, DEVICE_ATTRIBUTE char *
/*
"read" request on "firmware_version" special file.
*/
static ssize_t pod_get_firmware_version(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_firmware_version(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -811,7 +843,8 @@ static ssize_t pod_get_firmware_version(struct device *dev, DEVICE_ATTRIBUTE cha
/*
"read" request on "device_id" special file.
*/
static ssize_t pod_get_device_id(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_get_device_id(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -821,7 +854,8 @@ static ssize_t pod_get_device_id(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"read" request on "clip" special file.
*/
static ssize_t pod_wait_for_clip(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t pod_wait_for_clip(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
......@@ -846,7 +880,8 @@ static ssize_t pod_wait_for_clip(struct device *dev, DEVICE_ATTRIBUTE char *buf)
}
#define POD_GET_SYSTEM_PARAM(code, tuner, sign) \
static ssize_t pod_get_ ## code(struct device *dev, DEVICE_ATTRIBUTE char *buf) \
static ssize_t pod_get_ ## code(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct usb_interface *interface = to_usb_interface(dev); \
struct usb_line6_pod *pod = usb_get_intfdata(interface); \
......@@ -855,7 +890,9 @@ static ssize_t pod_get_ ## code(struct device *dev, DEVICE_ATTRIBUTE char *buf)
#define POD_GET_SET_SYSTEM_PARAM(code, mask, tuner, sign) \
POD_GET_SYSTEM_PARAM(code, tuner, sign) \
static ssize_t pod_set_ ## code(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count) \
static ssize_t pod_set_ ## code(struct device *dev, \
struct device_attribute *attr, const char *buf, \
size_t count) \
{ \
struct usb_interface *interface = to_usb_interface(dev); \
struct usb_line6_pod *pod = usb_get_intfdata(interface); \
......
......@@ -91,13 +91,17 @@ static void toneport_update_led(struct device *dev) {
(line6 = &tp->line6))
toneport_send_cmd(line6->usbdev, (led_red<<8)|0x0002, led_green); // for setting the LED on Guitarport
}
static ssize_t toneport_set_led_red(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count) {
static ssize_t toneport_set_led_red(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count) {
char* c;
led_red = simple_strtol(buf, &c, 10);
toneport_update_led(dev);
return count;
}
static ssize_t toneport_set_led_green(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count) {
static ssize_t toneport_set_led_green(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count) {
char* c;
led_green = simple_strtol(buf, &c, 10);
toneport_update_led(dev);
......
......@@ -162,7 +162,8 @@ void variax_process_message(struct usb_line6_variax *variax)
/*
"read" request on "volume" special file.
*/
static ssize_t variax_get_volume(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_volume(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
return sprintf(buf, "%d\n", variax->volume);
......@@ -171,7 +172,9 @@ static ssize_t variax_get_volume(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "volume" special file.
*/
static ssize_t variax_set_volume(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t variax_set_volume(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
int value = simple_strtoul(buf, NULL, 10);
......@@ -185,7 +188,8 @@ static ssize_t variax_set_volume(struct device *dev, DEVICE_ATTRIBUTE const char
/*
"read" request on "model" special file.
*/
static ssize_t variax_get_model(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_model(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
return sprintf(buf, "%d\n", variax->model);
......@@ -194,7 +198,9 @@ static ssize_t variax_get_model(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "model" special file.
*/
static ssize_t variax_set_model(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t variax_set_model(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_line6_variax *variax = usb_get_intfdata( to_usb_interface(dev));
int value = simple_strtoul(buf, NULL, 10);
......@@ -208,7 +214,8 @@ static ssize_t variax_set_model(struct device *dev, DEVICE_ATTRIBUTE const char
/*
"read" request on "active" special file.
*/
static ssize_t variax_get_active(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_active(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
return sprintf(buf, "%d\n", variax->buffer_activate[VARIAX_OFFSET_ACTIVATE]);
......@@ -217,7 +224,9 @@ static ssize_t variax_get_active(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "active" special file.
*/
static ssize_t variax_set_active(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t variax_set_active(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
int value = simple_strtoul(buf, NULL, 10) ? 1 : 0;
......@@ -229,7 +238,8 @@ static ssize_t variax_set_active(struct device *dev, DEVICE_ATTRIBUTE const char
/*
"read" request on "tone" special file.
*/
static ssize_t variax_get_tone(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_tone(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
return sprintf(buf, "%d\n", variax->tone);
......@@ -238,7 +248,9 @@ static ssize_t variax_get_tone(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "tone" special file.
*/
static ssize_t variax_set_tone(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t variax_set_tone(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
int value = simple_strtoul(buf, NULL, 10);
......@@ -268,7 +280,8 @@ static ssize_t get_string(char *buf, const char *data, int length)
/*
"read" request on "name" special file.
*/
static ssize_t variax_get_name(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_name(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
line6_wait_dump(&variax->dumpreq, 0);
......@@ -278,7 +291,8 @@ static ssize_t variax_get_name(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"read" request on "bank" special file.
*/
static ssize_t variax_get_bank(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_bank(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
line6_wait_dump(&variax->dumpreq, 0);
......@@ -288,7 +302,8 @@ static ssize_t variax_get_bank(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"read" request on "dump" special file.
*/
static ssize_t variax_get_dump(struct device *dev, DEVICE_ATTRIBUTE char *buf)
static ssize_t variax_get_dump(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
int retval;
......@@ -303,7 +318,9 @@ static ssize_t variax_get_dump(struct device *dev, DEVICE_ATTRIBUTE char *buf)
/*
"write" request on "raw" special file.
*/
static ssize_t variax_set_raw2(struct device *dev, DEVICE_ATTRIBUTE const char *buf, size_t count)
static ssize_t variax_set_raw2(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct usb_line6_variax *variax = usb_get_intfdata(to_usb_interface(dev));
int size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment