Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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.
+4 −2
Original line number Diff line number Diff line
@@ -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); \
}
+6 −3
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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);
+12 −4
Original line number Diff line number Diff line
@@ -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);
Loading