staging: line6: Lindent and fix some checkpatch warnings in toneport.c
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
afb9091dd3
commit
63a4a8bad9
@@ -17,10 +17,8 @@
|
|||||||
#include "playback.h"
|
#include "playback.h"
|
||||||
#include "toneport.h"
|
#include "toneport.h"
|
||||||
|
|
||||||
|
|
||||||
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2);
|
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2);
|
||||||
|
|
||||||
|
|
||||||
static struct snd_ratden toneport_ratden = {
|
static struct snd_ratden toneport_ratden = {
|
||||||
.num_min = 44100,
|
.num_min = 44100,
|
||||||
.num_max = 44100,
|
.num_max = 44100,
|
||||||
@@ -46,8 +44,7 @@ static struct line6_pcm_properties toneport_pcm_properties = {
|
|||||||
.period_bytes_min = 180 * 4,
|
.period_bytes_min = 180 * 4,
|
||||||
.period_bytes_max = 8192,
|
.period_bytes_max = 8192,
|
||||||
.periods_min = 1,
|
.periods_min = 1,
|
||||||
.periods_max = 1024
|
.periods_max = 1024},
|
||||||
},
|
|
||||||
.snd_line6_capture_hw = {
|
.snd_line6_capture_hw = {
|
||||||
.info = (SNDRV_PCM_INFO_MMAP |
|
.info = (SNDRV_PCM_INFO_MMAP |
|
||||||
SNDRV_PCM_INFO_INTERLEAVED |
|
SNDRV_PCM_INFO_INTERLEAVED |
|
||||||
@@ -64,12 +61,10 @@ static struct line6_pcm_properties toneport_pcm_properties = {
|
|||||||
.period_bytes_min = 188 * 4,
|
.period_bytes_min = 188 * 4,
|
||||||
.period_bytes_max = 8192,
|
.period_bytes_max = 8192,
|
||||||
.periods_min = 1,
|
.periods_min = 1,
|
||||||
.periods_max = 1024
|
.periods_max = 1024},
|
||||||
},
|
|
||||||
.snd_line6_rates = {
|
.snd_line6_rates = {
|
||||||
.nrats = 1,
|
.nrats = 1,
|
||||||
.rats = &toneport_ratden
|
.rats = &toneport_ratden},
|
||||||
},
|
|
||||||
.bytes_per_frame = 4
|
.bytes_per_frame = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -117,9 +112,10 @@ static ssize_t toneport_set_led_green(struct device *dev,
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DEVICE_ATTR(led_red, S_IWUGO | S_IRUGO, line6_nop_read, toneport_set_led_red);
|
static DEVICE_ATTR(led_red, S_IWUGO | S_IRUGO, line6_nop_read,
|
||||||
static DEVICE_ATTR(led_green, S_IWUGO | S_IRUGO, line6_nop_read, toneport_set_led_green);
|
toneport_set_led_red);
|
||||||
|
static DEVICE_ATTR(led_green, S_IWUGO | S_IRUGO, line6_nop_read,
|
||||||
|
toneport_set_led_green);
|
||||||
|
|
||||||
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2)
|
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2)
|
||||||
{
|
{
|
||||||
@@ -204,8 +200,10 @@ int toneport_init(struct usb_interface *interface,
|
|||||||
toneport_send_cmd(usbdev, 0x0301, 0x0000);
|
toneport_send_cmd(usbdev, 0x0301, 0x0000);
|
||||||
|
|
||||||
if (usbdev->descriptor.idProduct != LINE6_DEVID_GUITARPORT) {
|
if (usbdev->descriptor.idProduct != LINE6_DEVID_GUITARPORT) {
|
||||||
CHECK_RETURN(device_create_file(&interface->dev, &dev_attr_led_red));
|
CHECK_RETURN(device_create_file
|
||||||
CHECK_RETURN(device_create_file(&interface->dev, &dev_attr_led_green));
|
(&interface->dev, &dev_attr_led_red));
|
||||||
|
CHECK_RETURN(device_create_file
|
||||||
|
(&interface->dev, &dev_attr_led_green));
|
||||||
toneport_update_led(&usbdev->dev);
|
toneport_update_led(&usbdev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +221,8 @@ void toneport_disconnect(struct usb_interface *interface)
|
|||||||
return;
|
return;
|
||||||
toneport = usb_get_intfdata(interface);
|
toneport = usb_get_intfdata(interface);
|
||||||
|
|
||||||
if (toneport->line6.usbdev->descriptor.idProduct != LINE6_DEVID_GUITARPORT) {
|
if (toneport->line6.usbdev->descriptor.idProduct !=
|
||||||
|
LINE6_DEVID_GUITARPORT) {
|
||||||
device_remove_file(&interface->dev, &dev_attr_led_red);
|
device_remove_file(&interface->dev, &dev_attr_led_red);
|
||||||
device_remove_file(&interface->dev, &dev_attr_led_green);
|
device_remove_file(&interface->dev, &dev_attr_led_green);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user