* [PATCH 09/13] staging: line6: Lindent and fix some checkpatch warnings in toneport.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/toneport.c | 99 +++++++++++++++++++-------------------
1 files changed, 49 insertions(+), 50 deletions(-)
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index eaa1229..84bf29c 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -17,10 +17,8 @@
#include "playback.h"
#include "toneport.h"
-
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2);
-
static struct snd_ratden toneport_ratden = {
.num_min = 44100,
.num_max = 44100,
@@ -29,47 +27,44 @@ static struct snd_ratden toneport_ratden = {
};
static struct line6_pcm_properties toneport_pcm_properties = {
- .snd_line6_playback_hw = {
- .info = (SNDRV_PCM_INFO_MMAP |
- SNDRV_PCM_INFO_INTERLEAVED |
- SNDRV_PCM_INFO_BLOCK_TRANSFER |
- SNDRV_PCM_INFO_MMAP_VALID |
- SNDRV_PCM_INFO_PAUSE |
- SNDRV_PCM_INFO_SYNC_START),
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
- .rates = SNDRV_PCM_RATE_KNOT,
- .rate_min = 44100,
- .rate_max = 44100,
- .channels_min = 2,
- .channels_max = 2,
- .buffer_bytes_max = 60000,
- .period_bytes_min = 180 * 4,
- .period_bytes_max = 8192,
- .periods_min = 1,
- .periods_max = 1024
- },
- .snd_line6_capture_hw = {
- .info = (SNDRV_PCM_INFO_MMAP |
- SNDRV_PCM_INFO_INTERLEAVED |
- SNDRV_PCM_INFO_BLOCK_TRANSFER |
- SNDRV_PCM_INFO_MMAP_VALID |
- SNDRV_PCM_INFO_SYNC_START),
- .formats = SNDRV_PCM_FMTBIT_S16_LE,
- .rates = SNDRV_PCM_RATE_KNOT,
- .rate_min = 44100,
- .rate_max = 44100,
- .channels_min = 2,
- .channels_max = 2,
- .buffer_bytes_max = 60000,
- .period_bytes_min = 188 * 4,
- .period_bytes_max = 8192,
- .periods_min = 1,
- .periods_max = 1024
- },
+ .snd_line6_playback_hw = {
+ .info = (SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER |
+ SNDRV_PCM_INFO_MMAP_VALID |
+ SNDRV_PCM_INFO_PAUSE |
+ SNDRV_PCM_INFO_SYNC_START),
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = SNDRV_PCM_RATE_KNOT,
+ .rate_min = 44100,
+ .rate_max = 44100,
+ .channels_min = 2,
+ .channels_max = 2,
+ .buffer_bytes_max = 60000,
+ .period_bytes_min = 180 * 4,
+ .period_bytes_max = 8192,
+ .periods_min = 1,
+ .periods_max = 1024},
+ .snd_line6_capture_hw = {
+ .info = (SNDRV_PCM_INFO_MMAP |
+ SNDRV_PCM_INFO_INTERLEAVED |
+ SNDRV_PCM_INFO_BLOCK_TRANSFER |
+ SNDRV_PCM_INFO_MMAP_VALID |
+ SNDRV_PCM_INFO_SYNC_START),
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = SNDRV_PCM_RATE_KNOT,
+ .rate_min = 44100,
+ .rate_max = 44100,
+ .channels_min = 2,
+ .channels_max = 2,
+ .buffer_bytes_max = 60000,
+ .period_bytes_min = 188 * 4,
+ .period_bytes_max = 8192,
+ .periods_min = 1,
+ .periods_max = 1024},
.snd_line6_rates = {
- .nrats = 1,
- .rats = &toneport_ratden
- },
+ .nrats = 1,
+ .rats = &toneport_ratden},
.bytes_per_frame = 4
};
@@ -117,9 +112,10 @@ static ssize_t toneport_set_led_green(struct device *dev,
return count;
}
-static DEVICE_ATTR(led_red, S_IWUGO | S_IRUGO, line6_nop_read, toneport_set_led_red);
-static DEVICE_ATTR(led_green, S_IWUGO | S_IRUGO, line6_nop_read, toneport_set_led_green);
-
+static DEVICE_ATTR(led_red, S_IWUGO | S_IRUGO, line6_nop_read,
+ 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)
{
@@ -196,16 +192,18 @@ int toneport_init(struct usb_interface *interface,
line6_write_data(line6, 0x80c6, &ticks, 4);
/*
- seems to work without the first two...
- */
+ seems to work without the first two...
+ */
/* toneport_send_cmd(usbdev, 0x0201, 0x0002); */
/* toneport_send_cmd(usbdev, 0x0801, 0x0000); */
/* only one that works for me; on GP, TP might be different? */
toneport_send_cmd(usbdev, 0x0301, 0x0000);
if (usbdev->descriptor.idProduct != LINE6_DEVID_GUITARPORT) {
- CHECK_RETURN(device_create_file(&interface->dev, &dev_attr_led_red));
- CHECK_RETURN(device_create_file(&interface->dev, &dev_attr_led_green));
+ CHECK_RETURN(device_create_file
+ (&interface->dev, &dev_attr_led_red));
+ CHECK_RETURN(device_create_file
+ (&interface->dev, &dev_attr_led_green));
toneport_update_led(&usbdev->dev);
}
@@ -223,7 +221,8 @@ void toneport_disconnect(struct usb_interface *interface)
return;
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_green);
}
--
1.6.5
^ permalink raw reply related
* [PATCH 08/13] staging: line6: Fix checkpatch warnings in pcm.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/pcm.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index fc4113f..dd98121 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -156,7 +156,8 @@ static int snd_line6_new_pcm(struct snd_line6_pcm *line6pcm)
strcpy(pcm->name, line6pcm->line6->properties->name);
/* set operators */
- snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_line6_playback_ops);
+ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
+ &snd_line6_playback_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_line6_capture_ops);
/* pre-allocation of buffers */
--
1.6.5
^ permalink raw reply related
* [PATCH 04/13] staging: line6: Fix checkpatch errors in capture.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/capture.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c
index 7009f39..fd4890d 100644
--- a/drivers/staging/line6/capture.c
+++ b/drivers/staging/line6/capture.c
@@ -219,8 +219,8 @@ static void audio_in_callback(struct urb *urb)
fbuf, fsize * bytes_per_frame);
}
- if ((line6pcm->pos_in_done +=
- frames) >= runtime->buffer_size)
+ line6pcm->pos_in_done += frames;
+ if (line6pcm->pos_in_done >= runtime->buffer_size)
line6pcm->pos_in_done -= runtime->buffer_size;
}
}
@@ -235,7 +235,8 @@ static void audio_in_callback(struct urb *urb)
if (!shutdown) {
submit_audio_in_urb(substream);
- if ((line6pcm->bytes_in += length) >= line6pcm->period_in) {
+ line6pcm->bytes_in += length;
+ if (line6pcm->bytes_in >= line6pcm->period_in) {
line6pcm->bytes_in -= line6pcm->period_in;
snd_pcm_period_elapsed(substream);
}
--
1.6.5
^ permalink raw reply related
* [PATCH 06/13] staging: line6: Fix some checkpatch warnings in control.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/control.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/line6/control.c b/drivers/staging/line6/control.c
index cfc6543..2d98935 100644
--- a/drivers/staging/line6/control.c
+++ b/drivers/staging/line6/control.c
@@ -22,18 +22,18 @@
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, \
+static ssize_t prefix##_get_##param(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
- return prefix ## _get_param_ ## type(dev, buf, PREFIX ## _ ## param); \
+ 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, \
+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); \
+ return prefix##_set_param_##type(dev, buf, count, PREFIX##_##param); \
}
#define POD_PARAM_R(type, param) LINE6_PARAM_R(POD, pod, type, param)
@@ -727,6 +727,7 @@ int pod_create_files(int firmware, int type, struct device *dev)
(dev, &dev_attr_band_6_gain__bass));
return 0;
}
+EXPORT_SYMBOL(pod_create_files);
void pod_remove_files(int firmware, int type, struct device *dev)
{
@@ -901,8 +902,6 @@ void pod_remove_files(int firmware, int type, struct device *dev)
if (firmware >= 200)
device_remove_file(dev, &dev_attr_band_6_gain__bass);
}
-
-EXPORT_SYMBOL(pod_create_files);
EXPORT_SYMBOL(pod_remove_files);
int variax_create_files(int firmware, int type, struct device *dev)
@@ -949,6 +948,7 @@ int variax_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_pickup_wiring));
return 0;
}
+EXPORT_SYMBOL(variax_create_files);
void variax_remove_files(int firmware, int type, struct device *dev)
{
@@ -992,6 +992,4 @@ void variax_remove_files(int firmware, int type, struct device *dev)
device_remove_file(dev, &dev_attr_mix1);
device_remove_file(dev, &dev_attr_pickup_wiring);
}
-
-EXPORT_SYMBOL(variax_create_files);
EXPORT_SYMBOL(variax_remove_files);
--
1.6.5
^ permalink raw reply related
* [PATCH 05/13] staging: line6: Lindent control.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/control.c | 471 ++++++++++++++++++++++++++-------------
1 files changed, 314 insertions(+), 157 deletions(-)
diff --git a/drivers/staging/line6/control.c b/drivers/staging/line6/control.c
index 23ad08e..cfc6543 100644
--- a/drivers/staging/line6/control.c
+++ b/drivers/staging/line6/control.c
@@ -41,7 +41,6 @@ static ssize_t prefix ## _set_ ## param(struct device *dev, \
#define VARIAX_PARAM_R(type, param) LINE6_PARAM_R(VARIAX, variax, type, param)
#define VARIAX_PARAM_RW(type, param) LINE6_PARAM_RW(VARIAX, variax, type, param)
-
static ssize_t pod_get_param_int(struct device *dev, char *buf, int param)
{
struct usb_interface *interface = to_usb_interface(dev);
@@ -52,7 +51,8 @@ static ssize_t pod_get_param_int(struct device *dev, char *buf, int param)
return sprintf(buf, "%d\n", pod->prog_data.control[param]);
}
-static ssize_t pod_set_param_int(struct device *dev, const char *buf, size_t count, int param)
+static ssize_t pod_set_param_int(struct device *dev, const char *buf,
+ size_t count, int param)
{
struct usb_interface *interface = to_usb_interface(dev);
struct usb_line6_pod *pod = usb_get_intfdata(interface);
@@ -74,13 +74,13 @@ static ssize_t variax_get_param_int(struct device *dev, char *buf, int param)
static ssize_t variax_get_param_float(struct device *dev, char *buf, int param)
{
/*
- We do our own floating point handling here since floats in the
- kernel are problematic for at least two reasons: - many distros
- are still shipped with binary kernels optimized for the ancient
- 80386 without FPU
- - there isn't a printf("%f")
- (see http://www.kernelthread.com/publications/faq/335.html)
- */
+ We do our own floating point handling here since floats in the
+ kernel are problematic for at least two reasons: - many distros
+ are still shipped with binary kernels optimized for the ancient
+ 80386 without FPU
+ - there isn't a printf("%f")
+ (see http://www.kernelthread.com/publications/faq/335.html)
+ */
static const int BIAS = 0x7f;
static const int OFFSET = 0xf;
@@ -110,10 +110,13 @@ static ssize_t variax_get_param_float(struct device *dev, char *buf, int param)
part_frac = (mantissa << (32 + exponent)) & 0xffffffff;
}
- part_frac = (part_frac / ((1UL << 31) / (PRECISION / 2 * 10)) + 5) / 10;
+ part_frac =
+ (part_frac / ((1UL << 31) / (PRECISION / 2 * 10)) + 5) / 10;
}
- len += sprintf(buf + len, "%s%d.%03d\n", ((p[0] & 0x80) ? "-" : ""), part_int, part_frac);
+ len +=
+ sprintf(buf + len, "%s%d.%03d\n", ((p[0] & 0x80) ? "-" : ""),
+ part_int, part_frac);
return len;
}
@@ -260,127 +263,246 @@ VARIAX_PARAM_R(float, mix1);
VARIAX_PARAM_R(int, pickup_wiring);
static DEVICE_ATTR(tweak, S_IWUGO | S_IRUGO, pod_get_tweak, pod_set_tweak);
-static DEVICE_ATTR(wah_position, S_IWUGO | S_IRUGO, pod_get_wah_position, pod_set_wah_position);
-static DEVICE_ATTR(compression_gain, S_IWUGO | S_IRUGO, pod_get_compression_gain, pod_set_compression_gain);
-static DEVICE_ATTR(vol_pedal_position, S_IWUGO | S_IRUGO, pod_get_vol_pedal_position, pod_set_vol_pedal_position);
-static DEVICE_ATTR(compression_threshold, S_IWUGO | S_IRUGO, pod_get_compression_threshold, pod_set_compression_threshold);
+static DEVICE_ATTR(wah_position, S_IWUGO | S_IRUGO, pod_get_wah_position,
+ pod_set_wah_position);
+static DEVICE_ATTR(compression_gain, S_IWUGO | S_IRUGO,
+ pod_get_compression_gain, pod_set_compression_gain);
+static DEVICE_ATTR(vol_pedal_position, S_IWUGO | S_IRUGO,
+ pod_get_vol_pedal_position, pod_set_vol_pedal_position);
+static DEVICE_ATTR(compression_threshold, S_IWUGO | S_IRUGO,
+ pod_get_compression_threshold,
+ pod_set_compression_threshold);
static DEVICE_ATTR(pan, S_IWUGO | S_IRUGO, pod_get_pan, pod_set_pan);
-static DEVICE_ATTR(amp_model_setup, S_IWUGO | S_IRUGO, pod_get_amp_model_setup, pod_set_amp_model_setup);
-static DEVICE_ATTR(amp_model, S_IWUGO | S_IRUGO, pod_get_amp_model, pod_set_amp_model);
+static DEVICE_ATTR(amp_model_setup, S_IWUGO | S_IRUGO, pod_get_amp_model_setup,
+ pod_set_amp_model_setup);
+static DEVICE_ATTR(amp_model, S_IWUGO | S_IRUGO, pod_get_amp_model,
+ pod_set_amp_model);
static DEVICE_ATTR(drive, S_IWUGO | S_IRUGO, pod_get_drive, pod_set_drive);
static DEVICE_ATTR(bass, S_IWUGO | S_IRUGO, pod_get_bass, pod_set_bass);
static DEVICE_ATTR(mid, S_IWUGO | S_IRUGO, pod_get_mid, pod_set_mid);
static DEVICE_ATTR(lowmid, S_IWUGO | S_IRUGO, pod_get_lowmid, pod_set_lowmid);
static DEVICE_ATTR(treble, S_IWUGO | S_IRUGO, pod_get_treble, pod_set_treble);
-static DEVICE_ATTR(highmid, S_IWUGO | S_IRUGO, pod_get_highmid, pod_set_highmid);
-static DEVICE_ATTR(chan_vol, S_IWUGO | S_IRUGO, pod_get_chan_vol, pod_set_chan_vol);
-static DEVICE_ATTR(reverb_mix, S_IWUGO | S_IRUGO, pod_get_reverb_mix, pod_set_reverb_mix);
-static DEVICE_ATTR(effect_setup, S_IWUGO | S_IRUGO, pod_get_effect_setup, pod_set_effect_setup);
-static DEVICE_ATTR(band_1_frequency, S_IWUGO | S_IRUGO, pod_get_band_1_frequency, pod_set_band_1_frequency);
-static DEVICE_ATTR(presence, S_IWUGO | S_IRUGO, pod_get_presence, pod_set_presence);
-static DEVICE_ATTR2(treble__bass, treble, S_IWUGO | S_IRUGO, pod_get_treble__bass, pod_set_treble__bass);
-static DEVICE_ATTR(noise_gate_enable, S_IWUGO | S_IRUGO, pod_get_noise_gate_enable, pod_set_noise_gate_enable);
-static DEVICE_ATTR(gate_threshold, S_IWUGO | S_IRUGO, pod_get_gate_threshold, pod_set_gate_threshold);
-static DEVICE_ATTR(gate_decay_time, S_IWUGO | S_IRUGO, pod_get_gate_decay_time, pod_set_gate_decay_time);
-static DEVICE_ATTR(stomp_enable, S_IWUGO | S_IRUGO, pod_get_stomp_enable, pod_set_stomp_enable);
-static DEVICE_ATTR(comp_enable, S_IWUGO | S_IRUGO, pod_get_comp_enable, pod_set_comp_enable);
-static DEVICE_ATTR(stomp_time, S_IWUGO | S_IRUGO, pod_get_stomp_time, pod_set_stomp_time);
-static DEVICE_ATTR(delay_enable, S_IWUGO | S_IRUGO, pod_get_delay_enable, pod_set_delay_enable);
-static DEVICE_ATTR(mod_param_1, S_IWUGO | S_IRUGO, pod_get_mod_param_1, pod_set_mod_param_1);
-static DEVICE_ATTR(delay_param_1, S_IWUGO | S_IRUGO, pod_get_delay_param_1, pod_set_delay_param_1);
-static DEVICE_ATTR(delay_param_1_note_value, S_IWUGO | S_IRUGO, pod_get_delay_param_1_note_value, pod_set_delay_param_1_note_value);
-static DEVICE_ATTR2(band_2_frequency__bass, band_2_frequency, S_IWUGO | S_IRUGO, pod_get_band_2_frequency__bass, pod_set_band_2_frequency__bass);
-static DEVICE_ATTR(delay_param_2, S_IWUGO | S_IRUGO, pod_get_delay_param_2, pod_set_delay_param_2);
-static DEVICE_ATTR(delay_volume_mix, S_IWUGO | S_IRUGO, pod_get_delay_volume_mix, pod_set_delay_volume_mix);
-static DEVICE_ATTR(delay_param_3, S_IWUGO | S_IRUGO, pod_get_delay_param_3, pod_set_delay_param_3);
-static DEVICE_ATTR(reverb_enable, S_IWUGO | S_IRUGO, pod_get_reverb_enable, pod_set_reverb_enable);
-static DEVICE_ATTR(reverb_type, S_IWUGO | S_IRUGO, pod_get_reverb_type, pod_set_reverb_type);
-static DEVICE_ATTR(reverb_decay, S_IWUGO | S_IRUGO, pod_get_reverb_decay, pod_set_reverb_decay);
-static DEVICE_ATTR(reverb_tone, S_IWUGO | S_IRUGO, pod_get_reverb_tone, pod_set_reverb_tone);
-static DEVICE_ATTR(reverb_pre_delay, S_IWUGO | S_IRUGO, pod_get_reverb_pre_delay, pod_set_reverb_pre_delay);
-static DEVICE_ATTR(reverb_pre_post, S_IWUGO | S_IRUGO, pod_get_reverb_pre_post, pod_set_reverb_pre_post);
-static DEVICE_ATTR(band_2_frequency, S_IWUGO | S_IRUGO, pod_get_band_2_frequency, pod_set_band_2_frequency);
-static DEVICE_ATTR2(band_3_frequency__bass, band_3_frequency, S_IWUGO | S_IRUGO, pod_get_band_3_frequency__bass, pod_set_band_3_frequency__bass);
-static DEVICE_ATTR(wah_enable, S_IWUGO | S_IRUGO, pod_get_wah_enable, pod_set_wah_enable);
-static DEVICE_ATTR(modulation_lo_cut, S_IWUGO | S_IRUGO, pod_get_modulation_lo_cut, pod_set_modulation_lo_cut);
-static DEVICE_ATTR(delay_reverb_lo_cut, S_IWUGO | S_IRUGO, pod_get_delay_reverb_lo_cut, pod_set_delay_reverb_lo_cut);
-static DEVICE_ATTR(volume_pedal_minimum, S_IWUGO | S_IRUGO, pod_get_volume_pedal_minimum, pod_set_volume_pedal_minimum);
-static DEVICE_ATTR(eq_pre_post, S_IWUGO | S_IRUGO, pod_get_eq_pre_post, pod_set_eq_pre_post);
-static DEVICE_ATTR(volume_pre_post, S_IWUGO | S_IRUGO, pod_get_volume_pre_post, pod_set_volume_pre_post);
-static DEVICE_ATTR(di_model, S_IWUGO | S_IRUGO, pod_get_di_model, pod_set_di_model);
-static DEVICE_ATTR(di_delay, S_IWUGO | S_IRUGO, pod_get_di_delay, pod_set_di_delay);
-static DEVICE_ATTR(mod_enable, S_IWUGO | S_IRUGO, pod_get_mod_enable, pod_set_mod_enable);
-static DEVICE_ATTR(mod_param_1_note_value, S_IWUGO | S_IRUGO, pod_get_mod_param_1_note_value, pod_set_mod_param_1_note_value);
-static DEVICE_ATTR(mod_param_2, S_IWUGO | S_IRUGO, pod_get_mod_param_2, pod_set_mod_param_2);
-static DEVICE_ATTR(mod_param_3, S_IWUGO | S_IRUGO, pod_get_mod_param_3, pod_set_mod_param_3);
-static DEVICE_ATTR(mod_param_4, S_IWUGO | S_IRUGO, pod_get_mod_param_4, pod_set_mod_param_4);
-static DEVICE_ATTR(mod_param_5, S_IWUGO | S_IRUGO, pod_get_mod_param_5, pod_set_mod_param_5);
-static DEVICE_ATTR(mod_volume_mix, S_IWUGO | S_IRUGO, pod_get_mod_volume_mix, pod_set_mod_volume_mix);
-static DEVICE_ATTR(mod_pre_post, S_IWUGO | S_IRUGO, pod_get_mod_pre_post, pod_set_mod_pre_post);
-static DEVICE_ATTR(modulation_model, S_IWUGO | S_IRUGO, pod_get_modulation_model, pod_set_modulation_model);
-static DEVICE_ATTR(band_3_frequency, S_IWUGO | S_IRUGO, pod_get_band_3_frequency, pod_set_band_3_frequency);
-static DEVICE_ATTR2(band_4_frequency__bass, band_4_frequency, S_IWUGO | S_IRUGO, pod_get_band_4_frequency__bass, pod_set_band_4_frequency__bass);
-static DEVICE_ATTR(mod_param_1_double_precision, S_IWUGO | S_IRUGO, pod_get_mod_param_1_double_precision, pod_set_mod_param_1_double_precision);
-static DEVICE_ATTR(delay_param_1_double_precision, S_IWUGO | S_IRUGO, pod_get_delay_param_1_double_precision, pod_set_delay_param_1_double_precision);
-static DEVICE_ATTR(eq_enable, S_IWUGO | S_IRUGO, pod_get_eq_enable, pod_set_eq_enable);
+static DEVICE_ATTR(highmid, S_IWUGO | S_IRUGO, pod_get_highmid,
+ pod_set_highmid);
+static DEVICE_ATTR(chan_vol, S_IWUGO | S_IRUGO, pod_get_chan_vol,
+ pod_set_chan_vol);
+static DEVICE_ATTR(reverb_mix, S_IWUGO | S_IRUGO, pod_get_reverb_mix,
+ pod_set_reverb_mix);
+static DEVICE_ATTR(effect_setup, S_IWUGO | S_IRUGO, pod_get_effect_setup,
+ pod_set_effect_setup);
+static DEVICE_ATTR(band_1_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_1_frequency, pod_set_band_1_frequency);
+static DEVICE_ATTR(presence, S_IWUGO | S_IRUGO, pod_get_presence,
+ pod_set_presence);
+static DEVICE_ATTR2(treble__bass, treble, S_IWUGO | S_IRUGO,
+ pod_get_treble__bass, pod_set_treble__bass);
+static DEVICE_ATTR(noise_gate_enable, S_IWUGO | S_IRUGO,
+ pod_get_noise_gate_enable, pod_set_noise_gate_enable);
+static DEVICE_ATTR(gate_threshold, S_IWUGO | S_IRUGO, pod_get_gate_threshold,
+ pod_set_gate_threshold);
+static DEVICE_ATTR(gate_decay_time, S_IWUGO | S_IRUGO, pod_get_gate_decay_time,
+ pod_set_gate_decay_time);
+static DEVICE_ATTR(stomp_enable, S_IWUGO | S_IRUGO, pod_get_stomp_enable,
+ pod_set_stomp_enable);
+static DEVICE_ATTR(comp_enable, S_IWUGO | S_IRUGO, pod_get_comp_enable,
+ pod_set_comp_enable);
+static DEVICE_ATTR(stomp_time, S_IWUGO | S_IRUGO, pod_get_stomp_time,
+ pod_set_stomp_time);
+static DEVICE_ATTR(delay_enable, S_IWUGO | S_IRUGO, pod_get_delay_enable,
+ pod_set_delay_enable);
+static DEVICE_ATTR(mod_param_1, S_IWUGO | S_IRUGO, pod_get_mod_param_1,
+ pod_set_mod_param_1);
+static DEVICE_ATTR(delay_param_1, S_IWUGO | S_IRUGO, pod_get_delay_param_1,
+ pod_set_delay_param_1);
+static DEVICE_ATTR(delay_param_1_note_value, S_IWUGO | S_IRUGO,
+ pod_get_delay_param_1_note_value,
+ pod_set_delay_param_1_note_value);
+static DEVICE_ATTR2(band_2_frequency__bass, band_2_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_2_frequency__bass,
+ pod_set_band_2_frequency__bass);
+static DEVICE_ATTR(delay_param_2, S_IWUGO | S_IRUGO, pod_get_delay_param_2,
+ pod_set_delay_param_2);
+static DEVICE_ATTR(delay_volume_mix, S_IWUGO | S_IRUGO,
+ pod_get_delay_volume_mix, pod_set_delay_volume_mix);
+static DEVICE_ATTR(delay_param_3, S_IWUGO | S_IRUGO, pod_get_delay_param_3,
+ pod_set_delay_param_3);
+static DEVICE_ATTR(reverb_enable, S_IWUGO | S_IRUGO, pod_get_reverb_enable,
+ pod_set_reverb_enable);
+static DEVICE_ATTR(reverb_type, S_IWUGO | S_IRUGO, pod_get_reverb_type,
+ pod_set_reverb_type);
+static DEVICE_ATTR(reverb_decay, S_IWUGO | S_IRUGO, pod_get_reverb_decay,
+ pod_set_reverb_decay);
+static DEVICE_ATTR(reverb_tone, S_IWUGO | S_IRUGO, pod_get_reverb_tone,
+ pod_set_reverb_tone);
+static DEVICE_ATTR(reverb_pre_delay, S_IWUGO | S_IRUGO,
+ pod_get_reverb_pre_delay, pod_set_reverb_pre_delay);
+static DEVICE_ATTR(reverb_pre_post, S_IWUGO | S_IRUGO, pod_get_reverb_pre_post,
+ pod_set_reverb_pre_post);
+static DEVICE_ATTR(band_2_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_2_frequency, pod_set_band_2_frequency);
+static DEVICE_ATTR2(band_3_frequency__bass, band_3_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_3_frequency__bass,
+ pod_set_band_3_frequency__bass);
+static DEVICE_ATTR(wah_enable, S_IWUGO | S_IRUGO, pod_get_wah_enable,
+ pod_set_wah_enable);
+static DEVICE_ATTR(modulation_lo_cut, S_IWUGO | S_IRUGO,
+ pod_get_modulation_lo_cut, pod_set_modulation_lo_cut);
+static DEVICE_ATTR(delay_reverb_lo_cut, S_IWUGO | S_IRUGO,
+ pod_get_delay_reverb_lo_cut, pod_set_delay_reverb_lo_cut);
+static DEVICE_ATTR(volume_pedal_minimum, S_IWUGO | S_IRUGO,
+ pod_get_volume_pedal_minimum, pod_set_volume_pedal_minimum);
+static DEVICE_ATTR(eq_pre_post, S_IWUGO | S_IRUGO, pod_get_eq_pre_post,
+ pod_set_eq_pre_post);
+static DEVICE_ATTR(volume_pre_post, S_IWUGO | S_IRUGO, pod_get_volume_pre_post,
+ pod_set_volume_pre_post);
+static DEVICE_ATTR(di_model, S_IWUGO | S_IRUGO, pod_get_di_model,
+ pod_set_di_model);
+static DEVICE_ATTR(di_delay, S_IWUGO | S_IRUGO, pod_get_di_delay,
+ pod_set_di_delay);
+static DEVICE_ATTR(mod_enable, S_IWUGO | S_IRUGO, pod_get_mod_enable,
+ pod_set_mod_enable);
+static DEVICE_ATTR(mod_param_1_note_value, S_IWUGO | S_IRUGO,
+ pod_get_mod_param_1_note_value,
+ pod_set_mod_param_1_note_value);
+static DEVICE_ATTR(mod_param_2, S_IWUGO | S_IRUGO, pod_get_mod_param_2,
+ pod_set_mod_param_2);
+static DEVICE_ATTR(mod_param_3, S_IWUGO | S_IRUGO, pod_get_mod_param_3,
+ pod_set_mod_param_3);
+static DEVICE_ATTR(mod_param_4, S_IWUGO | S_IRUGO, pod_get_mod_param_4,
+ pod_set_mod_param_4);
+static DEVICE_ATTR(mod_param_5, S_IWUGO | S_IRUGO, pod_get_mod_param_5,
+ pod_set_mod_param_5);
+static DEVICE_ATTR(mod_volume_mix, S_IWUGO | S_IRUGO, pod_get_mod_volume_mix,
+ pod_set_mod_volume_mix);
+static DEVICE_ATTR(mod_pre_post, S_IWUGO | S_IRUGO, pod_get_mod_pre_post,
+ pod_set_mod_pre_post);
+static DEVICE_ATTR(modulation_model, S_IWUGO | S_IRUGO,
+ pod_get_modulation_model, pod_set_modulation_model);
+static DEVICE_ATTR(band_3_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_3_frequency, pod_set_band_3_frequency);
+static DEVICE_ATTR2(band_4_frequency__bass, band_4_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_4_frequency__bass,
+ pod_set_band_4_frequency__bass);
+static DEVICE_ATTR(mod_param_1_double_precision, S_IWUGO | S_IRUGO,
+ pod_get_mod_param_1_double_precision,
+ pod_set_mod_param_1_double_precision);
+static DEVICE_ATTR(delay_param_1_double_precision, S_IWUGO | S_IRUGO,
+ pod_get_delay_param_1_double_precision,
+ pod_set_delay_param_1_double_precision);
+static DEVICE_ATTR(eq_enable, S_IWUGO | S_IRUGO, pod_get_eq_enable,
+ pod_set_eq_enable);
static DEVICE_ATTR(tap, S_IWUGO | S_IRUGO, pod_get_tap, pod_set_tap);
-static DEVICE_ATTR(volume_tweak_pedal_assign, S_IWUGO | S_IRUGO, pod_get_volume_tweak_pedal_assign, pod_set_volume_tweak_pedal_assign);
-static DEVICE_ATTR(band_5_frequency, S_IWUGO | S_IRUGO, pod_get_band_5_frequency, pod_set_band_5_frequency);
+static DEVICE_ATTR(volume_tweak_pedal_assign, S_IWUGO | S_IRUGO,
+ pod_get_volume_tweak_pedal_assign,
+ pod_set_volume_tweak_pedal_assign);
+static DEVICE_ATTR(band_5_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_5_frequency, pod_set_band_5_frequency);
static DEVICE_ATTR(tuner, S_IWUGO | S_IRUGO, pod_get_tuner, pod_set_tuner);
-static DEVICE_ATTR(mic_selection, S_IWUGO | S_IRUGO, pod_get_mic_selection, pod_set_mic_selection);
-static DEVICE_ATTR(cabinet_model, S_IWUGO | S_IRUGO, pod_get_cabinet_model, pod_set_cabinet_model);
-static DEVICE_ATTR(stomp_model, S_IWUGO | S_IRUGO, pod_get_stomp_model, pod_set_stomp_model);
-static DEVICE_ATTR(roomlevel, S_IWUGO | S_IRUGO, pod_get_roomlevel, pod_set_roomlevel);
-static DEVICE_ATTR(band_4_frequency, S_IWUGO | S_IRUGO, pod_get_band_4_frequency, pod_set_band_4_frequency);
-static DEVICE_ATTR(band_6_frequency, S_IWUGO | S_IRUGO, pod_get_band_6_frequency, pod_set_band_6_frequency);
-static DEVICE_ATTR(stomp_param_1_note_value, S_IWUGO | S_IRUGO, pod_get_stomp_param_1_note_value, pod_set_stomp_param_1_note_value);
-static DEVICE_ATTR(stomp_param_2, S_IWUGO | S_IRUGO, pod_get_stomp_param_2, pod_set_stomp_param_2);
-static DEVICE_ATTR(stomp_param_3, S_IWUGO | S_IRUGO, pod_get_stomp_param_3, pod_set_stomp_param_3);
-static DEVICE_ATTR(stomp_param_4, S_IWUGO | S_IRUGO, pod_get_stomp_param_4, pod_set_stomp_param_4);
-static DEVICE_ATTR(stomp_param_5, S_IWUGO | S_IRUGO, pod_get_stomp_param_5, pod_set_stomp_param_5);
-static DEVICE_ATTR(stomp_param_6, S_IWUGO | S_IRUGO, pod_get_stomp_param_6, pod_set_stomp_param_6);
-static DEVICE_ATTR(amp_switch_select, S_IWUGO | S_IRUGO, pod_get_amp_switch_select, pod_set_amp_switch_select);
-static DEVICE_ATTR(delay_param_4, S_IWUGO | S_IRUGO, pod_get_delay_param_4, pod_set_delay_param_4);
-static DEVICE_ATTR(delay_param_5, S_IWUGO | S_IRUGO, pod_get_delay_param_5, pod_set_delay_param_5);
-static DEVICE_ATTR(delay_pre_post, S_IWUGO | S_IRUGO, pod_get_delay_pre_post, pod_set_delay_pre_post);
-static DEVICE_ATTR(delay_model, S_IWUGO | S_IRUGO, pod_get_delay_model, pod_set_delay_model);
-static DEVICE_ATTR(delay_verb_model, S_IWUGO | S_IRUGO, pod_get_delay_verb_model, pod_set_delay_verb_model);
-static DEVICE_ATTR(tempo_msb, S_IWUGO | S_IRUGO, pod_get_tempo_msb, pod_set_tempo_msb);
-static DEVICE_ATTR(tempo_lsb, S_IWUGO | S_IRUGO, pod_get_tempo_lsb, pod_set_tempo_lsb);
-static DEVICE_ATTR(wah_model, S_IWUGO | S_IRUGO, pod_get_wah_model, pod_set_wah_model);
-static DEVICE_ATTR(bypass_volume, S_IWUGO | S_IRUGO, pod_get_bypass_volume, pod_set_bypass_volume);
-static DEVICE_ATTR(fx_loop_on_off, S_IWUGO | S_IRUGO, pod_get_fx_loop_on_off, pod_set_fx_loop_on_off);
-static DEVICE_ATTR(tweak_param_select, S_IWUGO | S_IRUGO, pod_get_tweak_param_select, pod_set_tweak_param_select);
-static DEVICE_ATTR(amp1_engage, S_IWUGO | S_IRUGO, pod_get_amp1_engage, pod_set_amp1_engage);
-static DEVICE_ATTR(band_1_gain, S_IWUGO | S_IRUGO, pod_get_band_1_gain, pod_set_band_1_gain);
-static DEVICE_ATTR2(band_2_gain__bass, band_2_gain, S_IWUGO | S_IRUGO, pod_get_band_2_gain__bass, pod_set_band_2_gain__bass);
-static DEVICE_ATTR(band_2_gain, S_IWUGO | S_IRUGO, pod_get_band_2_gain, pod_set_band_2_gain);
-static DEVICE_ATTR2(band_3_gain__bass, band_3_gain, S_IWUGO | S_IRUGO, pod_get_band_3_gain__bass, pod_set_band_3_gain__bass);
-static DEVICE_ATTR(band_3_gain, S_IWUGO | S_IRUGO, pod_get_band_3_gain, pod_set_band_3_gain);
-static DEVICE_ATTR2(band_4_gain__bass, band_4_gain, S_IWUGO | S_IRUGO, pod_get_band_4_gain__bass, pod_set_band_4_gain__bass);
-static DEVICE_ATTR2(band_5_gain__bass, band_5_gain, S_IWUGO | S_IRUGO, pod_get_band_5_gain__bass, pod_set_band_5_gain__bass);
-static DEVICE_ATTR(band_4_gain, S_IWUGO | S_IRUGO, pod_get_band_4_gain, pod_set_band_4_gain);
-static DEVICE_ATTR2(band_6_gain__bass, band_6_gain, S_IWUGO | S_IRUGO, pod_get_band_6_gain__bass, pod_set_band_6_gain__bass);
+static DEVICE_ATTR(mic_selection, S_IWUGO | S_IRUGO, pod_get_mic_selection,
+ pod_set_mic_selection);
+static DEVICE_ATTR(cabinet_model, S_IWUGO | S_IRUGO, pod_get_cabinet_model,
+ pod_set_cabinet_model);
+static DEVICE_ATTR(stomp_model, S_IWUGO | S_IRUGO, pod_get_stomp_model,
+ pod_set_stomp_model);
+static DEVICE_ATTR(roomlevel, S_IWUGO | S_IRUGO, pod_get_roomlevel,
+ pod_set_roomlevel);
+static DEVICE_ATTR(band_4_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_4_frequency, pod_set_band_4_frequency);
+static DEVICE_ATTR(band_6_frequency, S_IWUGO | S_IRUGO,
+ pod_get_band_6_frequency, pod_set_band_6_frequency);
+static DEVICE_ATTR(stomp_param_1_note_value, S_IWUGO | S_IRUGO,
+ pod_get_stomp_param_1_note_value,
+ pod_set_stomp_param_1_note_value);
+static DEVICE_ATTR(stomp_param_2, S_IWUGO | S_IRUGO, pod_get_stomp_param_2,
+ pod_set_stomp_param_2);
+static DEVICE_ATTR(stomp_param_3, S_IWUGO | S_IRUGO, pod_get_stomp_param_3,
+ pod_set_stomp_param_3);
+static DEVICE_ATTR(stomp_param_4, S_IWUGO | S_IRUGO, pod_get_stomp_param_4,
+ pod_set_stomp_param_4);
+static DEVICE_ATTR(stomp_param_5, S_IWUGO | S_IRUGO, pod_get_stomp_param_5,
+ pod_set_stomp_param_5);
+static DEVICE_ATTR(stomp_param_6, S_IWUGO | S_IRUGO, pod_get_stomp_param_6,
+ pod_set_stomp_param_6);
+static DEVICE_ATTR(amp_switch_select, S_IWUGO | S_IRUGO,
+ pod_get_amp_switch_select, pod_set_amp_switch_select);
+static DEVICE_ATTR(delay_param_4, S_IWUGO | S_IRUGO, pod_get_delay_param_4,
+ pod_set_delay_param_4);
+static DEVICE_ATTR(delay_param_5, S_IWUGO | S_IRUGO, pod_get_delay_param_5,
+ pod_set_delay_param_5);
+static DEVICE_ATTR(delay_pre_post, S_IWUGO | S_IRUGO, pod_get_delay_pre_post,
+ pod_set_delay_pre_post);
+static DEVICE_ATTR(delay_model, S_IWUGO | S_IRUGO, pod_get_delay_model,
+ pod_set_delay_model);
+static DEVICE_ATTR(delay_verb_model, S_IWUGO | S_IRUGO,
+ pod_get_delay_verb_model, pod_set_delay_verb_model);
+static DEVICE_ATTR(tempo_msb, S_IWUGO | S_IRUGO, pod_get_tempo_msb,
+ pod_set_tempo_msb);
+static DEVICE_ATTR(tempo_lsb, S_IWUGO | S_IRUGO, pod_get_tempo_lsb,
+ pod_set_tempo_lsb);
+static DEVICE_ATTR(wah_model, S_IWUGO | S_IRUGO, pod_get_wah_model,
+ pod_set_wah_model);
+static DEVICE_ATTR(bypass_volume, S_IWUGO | S_IRUGO, pod_get_bypass_volume,
+ pod_set_bypass_volume);
+static DEVICE_ATTR(fx_loop_on_off, S_IWUGO | S_IRUGO, pod_get_fx_loop_on_off,
+ pod_set_fx_loop_on_off);
+static DEVICE_ATTR(tweak_param_select, S_IWUGO | S_IRUGO,
+ pod_get_tweak_param_select, pod_set_tweak_param_select);
+static DEVICE_ATTR(amp1_engage, S_IWUGO | S_IRUGO, pod_get_amp1_engage,
+ pod_set_amp1_engage);
+static DEVICE_ATTR(band_1_gain, S_IWUGO | S_IRUGO, pod_get_band_1_gain,
+ pod_set_band_1_gain);
+static DEVICE_ATTR2(band_2_gain__bass, band_2_gain, S_IWUGO | S_IRUGO,
+ pod_get_band_2_gain__bass, pod_set_band_2_gain__bass);
+static DEVICE_ATTR(band_2_gain, S_IWUGO | S_IRUGO, pod_get_band_2_gain,
+ pod_set_band_2_gain);
+static DEVICE_ATTR2(band_3_gain__bass, band_3_gain, S_IWUGO | S_IRUGO,
+ pod_get_band_3_gain__bass, pod_set_band_3_gain__bass);
+static DEVICE_ATTR(band_3_gain, S_IWUGO | S_IRUGO, pod_get_band_3_gain,
+ pod_set_band_3_gain);
+static DEVICE_ATTR2(band_4_gain__bass, band_4_gain, S_IWUGO | S_IRUGO,
+ pod_get_band_4_gain__bass, pod_set_band_4_gain__bass);
+static DEVICE_ATTR2(band_5_gain__bass, band_5_gain, S_IWUGO | S_IRUGO,
+ pod_get_band_5_gain__bass, pod_set_band_5_gain__bass);
+static DEVICE_ATTR(band_4_gain, S_IWUGO | S_IRUGO, pod_get_band_4_gain,
+ pod_set_band_4_gain);
+static DEVICE_ATTR2(band_6_gain__bass, band_6_gain, S_IWUGO | S_IRUGO,
+ pod_get_band_6_gain__bass, pod_set_band_6_gain__bass);
static DEVICE_ATTR(body, S_IRUGO, variax_get_body, line6_nop_write);
-static DEVICE_ATTR(pickup1_enable, S_IRUGO, variax_get_pickup1_enable, line6_nop_write);
-static DEVICE_ATTR(pickup1_type, S_IRUGO, variax_get_pickup1_type, line6_nop_write);
-static DEVICE_ATTR(pickup1_position, S_IRUGO, variax_get_pickup1_position, line6_nop_write);
-static DEVICE_ATTR(pickup1_angle, S_IRUGO, variax_get_pickup1_angle, line6_nop_write);
-static DEVICE_ATTR(pickup1_level, S_IRUGO, variax_get_pickup1_level, line6_nop_write);
-static DEVICE_ATTR(pickup2_enable, S_IRUGO, variax_get_pickup2_enable, line6_nop_write);
-static DEVICE_ATTR(pickup2_type, S_IRUGO, variax_get_pickup2_type, line6_nop_write);
-static DEVICE_ATTR(pickup2_position, S_IRUGO, variax_get_pickup2_position, line6_nop_write);
-static DEVICE_ATTR(pickup2_angle, S_IRUGO, variax_get_pickup2_angle, line6_nop_write);
-static DEVICE_ATTR(pickup2_level, S_IRUGO, variax_get_pickup2_level, line6_nop_write);
-static DEVICE_ATTR(pickup_phase, S_IRUGO, variax_get_pickup_phase, line6_nop_write);
-static DEVICE_ATTR(capacitance, S_IRUGO, variax_get_capacitance, line6_nop_write);
-static DEVICE_ATTR(tone_resistance, S_IRUGO, variax_get_tone_resistance, line6_nop_write);
-static DEVICE_ATTR(volume_resistance, S_IRUGO, variax_get_volume_resistance, line6_nop_write);
+static DEVICE_ATTR(pickup1_enable, S_IRUGO, variax_get_pickup1_enable,
+ line6_nop_write);
+static DEVICE_ATTR(pickup1_type, S_IRUGO, variax_get_pickup1_type,
+ line6_nop_write);
+static DEVICE_ATTR(pickup1_position, S_IRUGO, variax_get_pickup1_position,
+ line6_nop_write);
+static DEVICE_ATTR(pickup1_angle, S_IRUGO, variax_get_pickup1_angle,
+ line6_nop_write);
+static DEVICE_ATTR(pickup1_level, S_IRUGO, variax_get_pickup1_level,
+ line6_nop_write);
+static DEVICE_ATTR(pickup2_enable, S_IRUGO, variax_get_pickup2_enable,
+ line6_nop_write);
+static DEVICE_ATTR(pickup2_type, S_IRUGO, variax_get_pickup2_type,
+ line6_nop_write);
+static DEVICE_ATTR(pickup2_position, S_IRUGO, variax_get_pickup2_position,
+ line6_nop_write);
+static DEVICE_ATTR(pickup2_angle, S_IRUGO, variax_get_pickup2_angle,
+ line6_nop_write);
+static DEVICE_ATTR(pickup2_level, S_IRUGO, variax_get_pickup2_level,
+ line6_nop_write);
+static DEVICE_ATTR(pickup_phase, S_IRUGO, variax_get_pickup_phase,
+ line6_nop_write);
+static DEVICE_ATTR(capacitance, S_IRUGO, variax_get_capacitance,
+ line6_nop_write);
+static DEVICE_ATTR(tone_resistance, S_IRUGO, variax_get_tone_resistance,
+ line6_nop_write);
+static DEVICE_ATTR(volume_resistance, S_IRUGO, variax_get_volume_resistance,
+ line6_nop_write);
static DEVICE_ATTR(taper, S_IRUGO, variax_get_taper, line6_nop_write);
static DEVICE_ATTR(tone_dump, S_IRUGO, variax_get_tone_dump, line6_nop_write);
static DEVICE_ATTR(save_tone, S_IRUGO, variax_get_save_tone, line6_nop_write);
-static DEVICE_ATTR(volume_dump, S_IRUGO, variax_get_volume_dump, line6_nop_write);
-static DEVICE_ATTR(tuning_enable, S_IRUGO, variax_get_tuning_enable, line6_nop_write);
+static DEVICE_ATTR(volume_dump, S_IRUGO, variax_get_volume_dump,
+ line6_nop_write);
+static DEVICE_ATTR(tuning_enable, S_IRUGO, variax_get_tuning_enable,
+ line6_nop_write);
static DEVICE_ATTR(tuning6, S_IRUGO, variax_get_tuning6, line6_nop_write);
static DEVICE_ATTR(tuning5, S_IRUGO, variax_get_tuning5, line6_nop_write);
static DEVICE_ATTR(tuning4, S_IRUGO, variax_get_tuning4, line6_nop_write);
@@ -399,7 +521,8 @@ static DEVICE_ATTR(mix4, S_IRUGO, variax_get_mix4, line6_nop_write);
static DEVICE_ATTR(mix3, S_IRUGO, variax_get_mix3, line6_nop_write);
static DEVICE_ATTR(mix2, S_IRUGO, variax_get_mix2, line6_nop_write);
static DEVICE_ATTR(mix1, S_IRUGO, variax_get_mix1, line6_nop_write);
-static DEVICE_ATTR(pickup_wiring, S_IRUGO, variax_get_pickup_wiring, line6_nop_write);
+static DEVICE_ATTR(pickup_wiring, S_IRUGO, variax_get_pickup_wiring,
+ line6_nop_write);
int pod_create_files(int firmware, int type, struct device *dev)
{
@@ -407,7 +530,8 @@ int pod_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_tweak));
CHECK_RETURN(device_create_file(dev, &dev_attr_wah_position));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_compression_gain));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_compression_gain));
CHECK_RETURN(device_create_file(dev, &dev_attr_vol_pedal_position));
CHECK_RETURN(device_create_file(dev, &dev_attr_compression_threshold));
CHECK_RETURN(device_create_file(dev, &dev_attr_pan));
@@ -429,7 +553,8 @@ int pod_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_mix));
CHECK_RETURN(device_create_file(dev, &dev_attr_effect_setup));
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_frequency));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_1_frequency));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
CHECK_RETURN(device_create_file(dev, &dev_attr_presence));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
@@ -443,10 +568,12 @@ int pod_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_enable));
CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1));
- CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1_note_value));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_delay_param_1_note_value));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_frequency__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_2_frequency__bass));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_2));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_volume_mix));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_3));
@@ -459,26 +586,34 @@ int pod_create_files(int firmware, int type, struct device *dev)
if ((type & (LINE6_BITS_PODXTALL)) != 0)
CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_tone));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_pre_delay));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_reverb_pre_delay));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_pre_post));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_reverb_pre_post));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_frequency));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_2_frequency));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_frequency__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_3_frequency__bass));
CHECK_RETURN(device_create_file(dev, &dev_attr_wah_enable));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_lo_cut));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_modulation_lo_cut));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_delay_reverb_lo_cut));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_delay_reverb_lo_cut));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pedal_minimum));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_volume_pedal_minimum));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_eq_pre_post));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_eq_pre_post));
CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pre_post));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
CHECK_RETURN(device_create_file(dev, &dev_attr_di_model));
@@ -496,19 +631,25 @@ int pod_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_model));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_frequency));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_3_frequency));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_frequency__bass));
- CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1_double_precision));
- CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1_double_precision));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_4_frequency__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_mod_param_1_double_precision));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_delay_param_1_double_precision));
if (firmware >= 200)
CHECK_RETURN(device_create_file(dev, &dev_attr_eq_enable));
CHECK_RETURN(device_create_file(dev, &dev_attr_tap));
- CHECK_RETURN(device_create_file(dev, &dev_attr_volume_tweak_pedal_assign));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_volume_tweak_pedal_assign));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_5_frequency));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_5_frequency));
CHECK_RETURN(device_create_file(dev, &dev_attr_tuner));
CHECK_RETURN(device_create_file(dev, &dev_attr_mic_selection));
CHECK_RETURN(device_create_file(dev, &dev_attr_cabinet_model));
@@ -516,25 +657,30 @@ int pod_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_roomlevel));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_frequency));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_4_frequency));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_6_frequency));
- CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_1_note_value));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_6_frequency));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_stomp_param_1_note_value));
CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_2));
CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_3));
CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_4));
CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_5));
CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_6));
if ((type & (LINE6_BITS_LIVE)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_amp_switch_select));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_amp_switch_select));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_4));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_5));
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_pre_post));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
CHECK_RETURN(device_create_file(dev, &dev_attr_delay_model));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
- CHECK_RETURN(device_create_file(dev, &dev_attr_delay_verb_model));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_delay_verb_model));
CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_msb));
CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_lsb));
if (firmware >= 300)
@@ -549,29 +695,37 @@ int pod_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_gain));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_gain__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_2_gain__bass));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_gain));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_2_gain));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_gain__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_3_gain__bass));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_gain));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_3_gain));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_gain__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_4_gain__bass));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_5_gain__bass));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_5_gain__bass));
if ((type & (LINE6_BITS_PODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_gain));
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_4_gain));
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- CHECK_RETURN(device_create_file(dev, &dev_attr_band_6_gain__bass));
- return 0;
+ CHECK_RETURN(device_create_file
+ (dev, &dev_attr_band_6_gain__bass));
+ return 0;
}
void pod_remove_files(int firmware, int type, struct device *dev)
@@ -618,7 +772,8 @@ void pod_remove_files(int firmware, int type, struct device *dev)
device_remove_file(dev, &dev_attr_delay_param_1_note_value);
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- device_remove_file(dev, &dev_attr_band_2_frequency__bass);
+ device_remove_file(dev,
+ &dev_attr_band_2_frequency__bass);
device_remove_file(dev, &dev_attr_delay_param_2);
device_remove_file(dev, &dev_attr_delay_volume_mix);
device_remove_file(dev, &dev_attr_delay_param_3);
@@ -639,7 +794,8 @@ void pod_remove_files(int firmware, int type, struct device *dev)
device_remove_file(dev, &dev_attr_band_2_frequency);
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- device_remove_file(dev, &dev_attr_band_3_frequency__bass);
+ device_remove_file(dev,
+ &dev_attr_band_3_frequency__bass);
device_remove_file(dev, &dev_attr_wah_enable);
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
device_remove_file(dev, &dev_attr_modulation_lo_cut);
@@ -671,7 +827,8 @@ void pod_remove_files(int firmware, int type, struct device *dev)
device_remove_file(dev, &dev_attr_band_3_frequency);
if ((type & (LINE6_BITS_BASSPODXTALL)) != 0)
if (firmware >= 200)
- device_remove_file(dev, &dev_attr_band_4_frequency__bass);
+ device_remove_file(dev,
+ &dev_attr_band_4_frequency__bass);
device_remove_file(dev, &dev_attr_mod_param_1_double_precision);
device_remove_file(dev, &dev_attr_delay_param_1_double_precision);
if (firmware >= 200)
@@ -790,7 +947,7 @@ int variax_create_files(int firmware, int type, struct device *dev)
CHECK_RETURN(device_create_file(dev, &dev_attr_mix2));
CHECK_RETURN(device_create_file(dev, &dev_attr_mix1));
CHECK_RETURN(device_create_file(dev, &dev_attr_pickup_wiring));
- return 0;
+ return 0;
}
void variax_remove_files(int firmware, int type, struct device *dev)
--
1.6.5
^ permalink raw reply related
* [PATCH 03/13] staging: line6: Lindent and fix checkpatch warnings in capture.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/capture.c | 95 ++++++++++++++++++++++++++-------------
1 files changed, 63 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c
index ea2060b..7009f39 100644
--- a/drivers/staging/line6/capture.c
+++ b/drivers/staging/line6/capture.c
@@ -20,7 +20,6 @@
#include "pod.h"
#include "capture.h"
-
/*
Find a free URB and submit it.
*/
@@ -33,7 +32,8 @@ static int submit_audio_in_urb(struct snd_pcm_substream *substream)
struct urb *urb_in;
spin_lock_irqsave(&line6pcm->lock_audio_in, flags);
- index = find_first_zero_bit(&line6pcm->active_urb_in, LINE6_ISO_BUFFERS);
+ index =
+ find_first_zero_bit(&line6pcm->active_urb_in, LINE6_ISO_BUFFERS);
if (index >= LINE6_ISO_BUFFERS) {
spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags);
@@ -45,20 +45,24 @@ static int submit_audio_in_urb(struct snd_pcm_substream *substream)
urb_size = 0;
for (i = 0; i < LINE6_ISO_PACKETS; ++i) {
- struct usb_iso_packet_descriptor *fin = &urb_in->iso_frame_desc[i];
+ struct usb_iso_packet_descriptor *fin =
+ &urb_in->iso_frame_desc[i];
fin->offset = urb_size;
fin->length = line6pcm->max_packet_size;
urb_size += line6pcm->max_packet_size;
}
- urb_in->transfer_buffer = line6pcm->buffer_in + index * LINE6_ISO_PACKETS * line6pcm->max_packet_size;
+ urb_in->transfer_buffer =
+ line6pcm->buffer_in +
+ index * LINE6_ISO_PACKETS * line6pcm->max_packet_size;
urb_in->transfer_buffer_length = urb_size;
urb_in->context = substream;
if (usb_submit_urb(urb_in, GFP_ATOMIC) == 0)
set_bit(index, &line6pcm->active_urb_in);
else
- dev_err(s2m(substream), "URB in #%d submission failed\n", index);
+ dev_err(s2m(substream), "URB in #%d submission failed\n",
+ index);
spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags);
return 0;
@@ -143,7 +147,8 @@ static void audio_in_callback(struct urb *urb)
int frames;
unsigned long flags;
- struct snd_pcm_substream *substream = (struct snd_pcm_substream *)urb->context;
+ struct snd_pcm_substream *substream =
+ (struct snd_pcm_substream *)urb->context;
struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
const int bytes_per_frame = line6pcm->properties->bytes_per_frame;
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -155,8 +160,11 @@ static void audio_in_callback(struct urb *urb)
#if DO_DUMP_PCM_RECEIVE
for (i = 0; i < LINE6_ISO_PACKETS; ++i) {
- struct usb_iso_packet_descriptor *fout = &urb->iso_frame_desc[i];
- line6_write_hexdump(line6pcm->line6, 'C', urb->transfer_buffer + fout->offset, fout->length);
+ struct usb_iso_packet_descriptor *fout =
+ &urb->iso_frame_desc[i];
+ line6_write_hexdump(line6pcm->line6, 'C',
+ urb->transfer_buffer + fout->offset,
+ fout->length);
}
#endif
@@ -179,25 +187,40 @@ static void audio_in_callback(struct urb *urb)
if (fsize > 0) {
frames = fsize / bytes_per_frame;
- if (line6pcm->pos_in_done + frames > runtime->buffer_size) {
+ if (line6pcm->pos_in_done + frames >
+ runtime->buffer_size) {
/*
- The transferred area goes over buffer boundary,
- copy two separate chunks.
- */
+ The transferred area goes over buffer
+ boundary, copy two separate chunks.
+ */
int len;
- len = runtime->buffer_size - line6pcm->pos_in_done;
+ len =
+ runtime->buffer_size -
+ line6pcm->pos_in_done;
if (len > 0) {
- memcpy(runtime->dma_area + line6pcm->pos_in_done * bytes_per_frame, fbuf, len * bytes_per_frame);
- memcpy(runtime->dma_area, fbuf + len * bytes_per_frame, (frames - len) * bytes_per_frame);
- } else
- dev_err(s2m(substream), "driver bug: len = %d\n", len); /* this is somewhat paranoid */
+ memcpy(runtime->dma_area +
+ line6pcm->pos_in_done *
+ bytes_per_frame, fbuf,
+ len * bytes_per_frame);
+ memcpy(runtime->dma_area,
+ fbuf + len * bytes_per_frame,
+ (frames -
+ len) * bytes_per_frame);
+ } else {
+ /* this is somewhat paranoid */
+ dev_err(s2m(substream),
+ "driver bug: len = %d\n", len);
+ }
} else {
/* copy single chunk */
- memcpy(runtime->dma_area + line6pcm->pos_in_done * bytes_per_frame, fbuf, fsize * bytes_per_frame);
+ memcpy(runtime->dma_area +
+ line6pcm->pos_in_done * bytes_per_frame,
+ fbuf, fsize * bytes_per_frame);
}
- if ((line6pcm->pos_in_done += frames) >= runtime->buffer_size)
+ if ((line6pcm->pos_in_done +=
+ frames) >= runtime->buffer_size)
line6pcm->pos_in_done -= runtime->buffer_size;
}
}
@@ -228,7 +251,8 @@ static int snd_line6_capture_open(struct snd_pcm_substream *substream)
err = snd_pcm_hw_constraint_ratdens(runtime, 0,
SNDRV_PCM_HW_PARAM_RATE,
- (&line6pcm->properties->snd_line6_rates));
+ (&line6pcm->properties->
+ snd_line6_rates));
if (err < 0)
return err;
@@ -267,7 +291,9 @@ static int snd_line6_capture_hw_params(struct snd_pcm_substream *substream,
return ret;
line6pcm->period_in = params_period_bytes(hw_params);
- line6pcm->buffer_in = kmalloc(LINE6_ISO_BUFFERS * LINE6_ISO_PACKETS * LINE6_ISO_PACKET_SIZE_MAX, GFP_KERNEL);
+ line6pcm->buffer_in =
+ kmalloc(LINE6_ISO_BUFFERS * LINE6_ISO_PACKETS *
+ LINE6_ISO_PACKET_SIZE_MAX, GFP_KERNEL);
if (!line6pcm->buffer_in) {
dev_err(s2m(substream), "cannot malloc buffer_in\n");
@@ -302,7 +328,8 @@ int snd_line6_capture_trigger(struct snd_pcm_substream *substream, int cmd)
err = submit_audio_in_all_urbs(substream);
if (err < 0) {
- clear_bit(BIT_RUNNING_CAPTURE, &line6pcm->flags);
+ clear_bit(BIT_RUNNING_CAPTURE,
+ &line6pcm->flags);
return err;
}
}
@@ -332,14 +359,14 @@ snd_line6_capture_pointer(struct snd_pcm_substream *substream)
/* capture operators */
struct snd_pcm_ops snd_line6_capture_ops = {
- .open = snd_line6_capture_open,
- .close = snd_line6_capture_close,
- .ioctl = snd_pcm_lib_ioctl,
- .hw_params = snd_line6_capture_hw_params,
- .hw_free = snd_line6_capture_hw_free,
- .prepare = snd_line6_prepare,
- .trigger = snd_line6_trigger,
- .pointer = snd_line6_capture_pointer,
+ .open = snd_line6_capture_open,
+ .close = snd_line6_capture_close,
+ .ioctl = snd_pcm_lib_ioctl,
+ .hw_params = snd_line6_capture_hw_params,
+ .hw_free = snd_line6_capture_hw_free,
+ .prepare = snd_line6_prepare,
+ .trigger = snd_line6_trigger,
+ .pointer = snd_line6_capture_pointer,
};
int create_audio_in_urbs(struct snd_line6_pcm *line6pcm)
@@ -351,7 +378,8 @@ int create_audio_in_urbs(struct snd_line6_pcm *line6pcm)
struct urb *urb;
/* URB for audio in: */
- urb = line6pcm->urb_audio_in[i] = usb_alloc_urb(LINE6_ISO_PACKETS, GFP_KERNEL);
+ urb = line6pcm->urb_audio_in[i] =
+ usb_alloc_urb(LINE6_ISO_PACKETS, GFP_KERNEL);
if (urb == NULL) {
dev_err(line6pcm->line6->ifcdev, "Out of memory\n");
@@ -359,7 +387,10 @@ int create_audio_in_urbs(struct snd_line6_pcm *line6pcm)
}
urb->dev = line6pcm->line6->usbdev;
- urb->pipe = usb_rcvisocpipe(line6pcm->line6->usbdev, line6pcm->ep_audio_read & USB_ENDPOINT_NUMBER_MASK);
+ urb->pipe =
+ usb_rcvisocpipe(line6pcm->line6->usbdev,
+ line6pcm->
+ ep_audio_read & USB_ENDPOINT_NUMBER_MASK);
urb->transfer_flags = URB_ISO_ASAP;
urb->start_frame = -1;
urb->number_of_packets = LINE6_ISO_PACKETS;
--
1.6.5
^ permalink raw reply related
* [PATCH 01/13] staging: line6: Lindent and fix checkpatch warnings in playback.c
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
In-Reply-To: <1258345082-11811-1-git-send-email-shawn.bohrer@gmail.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
drivers/staging/line6/playback.c | 95 ++++++++++++++++++++++++-------------
1 files changed, 61 insertions(+), 34 deletions(-)
diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c
index acb0612..4192cd9 100644
--- a/drivers/staging/line6/playback.c
+++ b/drivers/staging/line6/playback.c
@@ -20,7 +20,6 @@
#include "pod.h"
#include "playback.h"
-
/*
Software stereo volume control.
*/
@@ -30,7 +29,7 @@ static void change_volume(struct urb *urb_out, int volume[],
int chn = 0;
if (volume[0] == 256 && volume[1] == 256)
- return; /* maximum volume - no change */
+ return; /* maximum volume - no change */
if (bytes_per_frame == 4) {
short *p, *buf_end;
@@ -68,13 +67,17 @@ static int submit_audio_out_urb(struct snd_pcm_substream *substream)
int i, urb_size, urb_frames;
struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
const int bytes_per_frame = line6pcm->properties->bytes_per_frame;
- const int frame_increment = line6pcm->properties->snd_line6_rates.rats[0].num_min;
- const int frame_factor = line6pcm->properties->snd_line6_rates.rats[0].den * (USB_INTERVALS_PER_SECOND / LINE6_ISO_INTERVAL);
+ const int frame_increment =
+ line6pcm->properties->snd_line6_rates.rats[0].num_min;
+ const int frame_factor =
+ line6pcm->properties->snd_line6_rates.rats[0].den *
+ (USB_INTERVALS_PER_SECOND / LINE6_ISO_INTERVAL);
struct snd_pcm_runtime *runtime = substream->runtime;
struct urb *urb_out;
spin_lock_irqsave(&line6pcm->lock_audio_out, flags);
- index = find_first_zero_bit(&line6pcm->active_urb_out, LINE6_ISO_BUFFERS);
+ index =
+ find_first_zero_bit(&line6pcm->active_urb_out, LINE6_ISO_BUFFERS);
if (index < 0 || index >= LINE6_ISO_BUFFERS) {
spin_unlock_irqrestore(&line6pcm->lock_audio_out, flags);
@@ -88,7 +91,8 @@ static int submit_audio_out_urb(struct snd_pcm_substream *substream)
for (i = 0; i < LINE6_ISO_PACKETS; ++i) {
/* compute frame size for given sampling rate */
int n, fs;
- struct usb_iso_packet_descriptor *fout = &urb_out->iso_frame_desc[i];
+ struct usb_iso_packet_descriptor *fout =
+ &urb_out->iso_frame_desc[i];
line6pcm->count_out += frame_increment;
n = line6pcm->count_out / frame_factor;
line6pcm->count_out -= n * frame_factor;
@@ -106,21 +110,31 @@ static int submit_audio_out_urb(struct snd_pcm_substream *substream)
} else {
if (line6pcm->pos_out + urb_frames > runtime->buffer_size) {
/*
- The transferred area goes over buffer boundary,
- copy the data to the temp buffer.
- */
+ The transferred area goes over buffer boundary,
+ copy the data to the temp buffer.
+ */
int len;
len = runtime->buffer_size - line6pcm->pos_out;
urb_out->transfer_buffer = line6pcm->wrap_out;
if (len > 0) {
- memcpy(line6pcm->wrap_out, runtime->dma_area + line6pcm->pos_out * bytes_per_frame, len * bytes_per_frame);
- memcpy(line6pcm->wrap_out + len * bytes_per_frame, runtime->dma_area, (urb_frames - len) * bytes_per_frame);
- } else
- dev_err(s2m(substream), "driver bug: len = %d\n", len); /* this is somewhat paranoid */
+ memcpy(line6pcm->wrap_out,
+ runtime->dma_area +
+ line6pcm->pos_out * bytes_per_frame,
+ len * bytes_per_frame);
+ memcpy(line6pcm->wrap_out +
+ len * bytes_per_frame, runtime->dma_area,
+ (urb_frames - len) * bytes_per_frame);
+ } else {
+ /* this is somewhat paranoid */
+ dev_err(s2m(substream),
+ "driver bug: len = %d\n", len);
+ }
} else {
/* set the buffer pointer */
- urb_out->transfer_buffer = runtime->dma_area + line6pcm->pos_out * bytes_per_frame;
+ urb_out->transfer_buffer =
+ runtime->dma_area +
+ line6pcm->pos_out * bytes_per_frame;
}
}
@@ -133,15 +147,19 @@ static int submit_audio_out_urb(struct snd_pcm_substream *substream)
#if DO_DUMP_PCM_SEND
for (i = 0; i < LINE6_ISO_PACKETS; ++i) {
- struct usb_iso_packet_descriptor *fout = &urb_out->iso_frame_desc[i];
- line6_write_hexdump(line6pcm->line6, 'P', urb_out->transfer_buffer + fout->offset, fout->length);
+ struct usb_iso_packet_descriptor *fout =
+ &urb_out->iso_frame_desc[i];
+ line6_write_hexdump(line6pcm->line6, 'P',
+ urb_out->transfer_buffer + fout->offset,
+ fout->length);
}
#endif
if (usb_submit_urb(urb_out, GFP_ATOMIC) == 0)
set_bit(index, &line6pcm->active_urb_out);
else
- dev_err(s2m(substream), "URB out #%d submission failed\n", index);
+ dev_err(s2m(substream), "URB out #%d submission failed\n",
+ index);
spin_unlock_irqrestore(&line6pcm->lock_audio_out, flags);
return 0;
@@ -181,7 +199,7 @@ static void unlink_audio_out_urbs(struct snd_line6_pcm *line6pcm)
}
/*
- Wait until unlinking of all currently active playback URBs has been finished.
+ Wait until unlinking of all currently active playback URBs has been finished.
*/
static void wait_clear_audio_out_urbs(struct snd_line6_pcm *line6pcm)
{
@@ -224,7 +242,8 @@ static void audio_out_callback(struct urb *urb)
int i, index, length = 0, shutdown = 0;
unsigned long flags;
- struct snd_pcm_substream *substream = (struct snd_pcm_substream *)urb->context;
+ struct snd_pcm_substream *substream =
+ (struct snd_pcm_substream *)urb->context;
struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -234,13 +253,14 @@ static void audio_out_callback(struct urb *urb)
break;
if (index < 0)
- return; /* URB has been unlinked asynchronously */
+ return; /* URB has been unlinked asynchronously */
for (i = LINE6_ISO_PACKETS; i--;)
length += urb->iso_frame_desc[i].length;
spin_lock_irqsave(&line6pcm->lock_audio_out, flags);
- line6pcm->pos_out_done += length / line6pcm->properties->bytes_per_frame;
+ line6pcm->pos_out_done +=
+ length / line6pcm->properties->bytes_per_frame;
if (line6pcm->pos_out_done >= runtime->buffer_size)
line6pcm->pos_out_done -= runtime->buffer_size;
@@ -276,7 +296,8 @@ static int snd_line6_playback_open(struct snd_pcm_substream *substream)
struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
err = snd_pcm_hw_constraint_ratdens(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
- (&line6pcm->properties->snd_line6_rates));
+ (&line6pcm->properties->
+ snd_line6_rates));
if (err < 0)
return err;
@@ -291,7 +312,8 @@ static int snd_line6_playback_close(struct snd_pcm_substream *substream)
}
/* hw_params playback callback */
-static int snd_line6_playback_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params)
+static int snd_line6_playback_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *hw_params)
{
int ret;
struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
@@ -349,7 +371,8 @@ int snd_line6_playback_trigger(struct snd_pcm_substream *substream, int cmd)
err = submit_audio_out_all_urbs(substream);
if (err < 0) {
- clear_bit(BIT_RUNNING_PLAYBACK, &line6pcm->flags);
+ clear_bit(BIT_RUNNING_PLAYBACK,
+ &line6pcm->flags);
return err;
}
}
@@ -387,14 +410,14 @@ snd_line6_playback_pointer(struct snd_pcm_substream *substream)
/* playback operators */
struct snd_pcm_ops snd_line6_playback_ops = {
- .open = snd_line6_playback_open,
- .close = snd_line6_playback_close,
- .ioctl = snd_pcm_lib_ioctl,
- .hw_params = snd_line6_playback_hw_params,
- .hw_free = snd_line6_playback_hw_free,
- .prepare = snd_line6_prepare,
- .trigger = snd_line6_trigger,
- .pointer = snd_line6_playback_pointer,
+ .open = snd_line6_playback_open,
+ .close = snd_line6_playback_close,
+ .ioctl = snd_pcm_lib_ioctl,
+ .hw_params = snd_line6_playback_hw_params,
+ .hw_free = snd_line6_playback_hw_free,
+ .prepare = snd_line6_prepare,
+ .trigger = snd_line6_trigger,
+ .pointer = snd_line6_playback_pointer,
};
int create_audio_out_urbs(struct snd_line6_pcm *line6pcm)
@@ -406,7 +429,8 @@ int create_audio_out_urbs(struct snd_line6_pcm *line6pcm)
struct urb *urb;
/* URB for audio out: */
- urb = line6pcm->urb_audio_out[i] = usb_alloc_urb(LINE6_ISO_PACKETS, GFP_KERNEL);
+ urb = line6pcm->urb_audio_out[i] =
+ usb_alloc_urb(LINE6_ISO_PACKETS, GFP_KERNEL);
if (urb == NULL) {
dev_err(line6pcm->line6->ifcdev, "Out of memory\n");
@@ -414,7 +438,10 @@ int create_audio_out_urbs(struct snd_line6_pcm *line6pcm)
}
urb->dev = line6pcm->line6->usbdev;
- urb->pipe = usb_sndisocpipe(line6pcm->line6->usbdev, line6pcm->ep_audio_write & USB_ENDPOINT_NUMBER_MASK);
+ urb->pipe =
+ usb_sndisocpipe(line6pcm->line6->usbdev,
+ line6pcm->
+ ep_audio_write & USB_ENDPOINT_NUMBER_MASK);
urb->transfer_flags = URB_ISO_ASAP;
urb->start_frame = -1;
urb->number_of_packets = LINE6_ISO_PACKETS;
--
1.6.5
^ permalink raw reply related
* [PATCH 00/13] staging: line6 cleanups
From: Shawn Bohrer @ 2009-11-16 4:17 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: devel, linux-kernel, Shawn Bohrer
The following patches fix formatting and checkpatch errors/warnings
for some of the files in the line6 driver.
Shawn Bohrer (13):
staging: line6: Lindent and fix checkpatch warnings in playback.c
staging: line6: Fix checkpatch errors in playback.c
staging: line6: Lindent and fix checkpatch warnings in capture.c
staging: line6: Fix checkpatch errors in capture.c
staging: line6: Lindent control.c
staging: line6: Fix some checkpatch warnings in control.c
staging: line6: Convert simple_strtoul() to strict_strtoul in
control.c
staging: line6: Fix checkpatch warnings in pcm.c
staging: line6: Lindent and fix some checkpatch warnings in
toneport.c
staging: line6: Convert simple_strtol to strict_strtol in toneport.c
staging: line6: Convert simple_strtoul to strict_strtoul in variax.c
staging: line6: Convert simple_strtoul to strict_strtoul in pod.c
staging: line6: Convert simple_strtoul to strict_strtoul in midi.c
drivers/staging/line6/capture.c | 98 +++++---
drivers/staging/line6/control.c | 493 +++++++++++++++++++++++++-------------
drivers/staging/line6/midi.c | 16 +-
drivers/staging/line6/pcm.c | 3 +-
drivers/staging/line6/playback.c | 101 +++++---
drivers/staging/line6/pod.c | 56 ++++-
drivers/staging/line6/toneport.c | 119 +++++----
drivers/staging/line6/variax.c | 31 ++-
8 files changed, 611 insertions(+), 306 deletions(-)
^ permalink raw reply
* Re: 2.6.32-rc6-git4 -- NetworkManager: page allocation failure. order:8, mode:0x8020
From: Miles Lane @ 2009-11-16 4:18 UTC (permalink / raw)
To: Jie Yang; +Cc: LKML, Jay Cliburn, Chris Snook
In-Reply-To: <72981EBCFD196144B7C6999B9FC34A9A494C18F02B@SHEXMB-01.global.atheros.com>
I download the latest linux tarball in bz2 format from ftp.kernel.org
and then apply the patches there. For example:
tar xvfj linux-2.6.31.tar.bz2
cd linux
bzcat ../patch-2.4.32-rc6.bz2 | patch -p1
bzcat ../patch-2.4.32-rc6-git4.bz2 | patch -p1
make defconfig
and so forth
On Sun, Nov 15, 2009 at 9:21 PM, Jie Yang <Jie.Yang@atheros.com> wrote:
> On Thursday, November 12, 2009 3:58 AM
> Miles Lane <miles.lane@gmail.com> wrote:
>> Subject: Re: 2.6.32-rc6-git4 -- NetworkManager: page
>> allocation failure. order:8, mode:0x8020
>>
>> This is completely reproducible with this kernel. I get the
>> error on boot, and then I get it again each time I wake the
>> OS from the suspend state.
>>
>> Miles
>>
>
> hi, Miles
> it seems that after git-pull my git-tag -l
> result is
> ... ...
> v2.6.31-rc9
> v2.6.32-rc1
> v2.6.32-rc3
>
> how can i get the 2.6.32-rc6-git4 version.
>
> best wishes
> jie
>
>
>
^ permalink raw reply
* Re: [LTP] [PATCH] Power Management: Fix missing make targets.
From: Poornima Nayak @ 2009-11-16 4:19 UTC (permalink / raw)
To: sachinp, qingbo yuan; +Cc: ltp-list
In-Reply-To: <20091112121455.16825.70322.sendpatchset@localhost.localdomain>
[-- Attachment #1.1: Type: text/plain, Size: 2383 bytes --]
Hi
Patch to handle this issue was mailed on 20/8/2009. Garret Cooper had
replied that makefile-infra-rework patch will take care of this
requirement. If makefile-infra-rework patch is in this error should not
have come up or makefile-rework-patch might have some issue.
Anyway there was reply from maintainer, the patch which I had sent will be
integrated till Garret Cooper's patch gets in. I am not sure how this
issue would have come up.
I feel its better to check in this patch to avoid Power Management test
case failures.
Regards
Poornima
From:
sachinp@linux.vnet.ibm.com
To:
ltp-list@lists.sourceforge.net
Cc:
sachinp@linux.vnet.ibm.com
Date:
11/12/2009 06:37 PM
Subject:
[LTP] [PATCH] Power Management: Fix missing make targets.
Make sure required binaries used by the power management tests are
compiled and
installed properly. Without the required MAKE TARGETS the test fails with
<<<test_output>>>
Are we really executing this ?
/opt/ltp/testcases/bin/runpwtests.sh: line 57: check_kv_arch: command not
found
.....
Power_Management 7 TPASS : CPUIDLE sysfs tests passed
/opt/ltp/testcases/bin/runpwtests.sh: line 173: get_sched_values: command
not
found
Patch is against LTP October version.
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
---
diff -Naurp a/testcases/kernel/power_management/Makefile
b/testcases/kernel/power_management/Makefile
--- a/testcases/kernel/power_management/Makefile 2009-11-12
13:02:57.000000000 +0530
+++ b/testcases/kernel/power_management/Makefile 2009-11-12
13:04:03.000000000 +0530
@@ -26,6 +26,6 @@ $(eval $(call generate_vpath_rule,c,$(sr
INSTALL_TARGETS := lib/*.py *.py *.sh
-MAKE_TARGETS :=
+MAKE_TARGETS := check_kv_arch get_sched_values
include $(top_srcdir)/include/mk/generic_leaf_target.mk
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and focus
on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
[-- Attachment #1.2: Type: text/html, Size: 4173 bytes --]
[-- Attachment #2: Type: text/plain, Size: 354 bytes --]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply
* Re: [PATCH] x86: eliminate redundant/contradicting cache line size config options
From: Nick Piggin @ 2009-11-16 4:14 UTC (permalink / raw)
To: Jan Beulich; +Cc: mingo, tglx, hpa, linux-kernel
In-Reply-To: <4AFD5710020000780001F8F0@vpn.id2.novell.com>
On Fri, Nov 13, 2009 at 11:54:40AM +0000, Jan Beulich wrote:
> Rather than having X86_L1_CACHE_BYTES and X86_L1_CACHE_SHIFT (with
> inconsistent defaults), just having the latter suffices as the former
> can be easily calculated from it.
>
> To be consistent, also change X86_INTERNODE_CACHE_BYTES to
> X86_INTERNODE_CACHE_SHIFT, and set it to 7 (128 bytes) for NUMA to
> account for last level cache line size (which here matters more than
> L1 cache line size).
I think if we're going to set it to 7 (128B, for Pentium 4), then
we should set the L1 cache shift as well? Most alignments to
prevent cacheline pingpong use L1 cache shift for this anyway?
The internode thing is really just a not quite well defined thing
because internode cachelines are really expensive and really big
on vsmp so they warrant trading off extra space on some critical
structures to reduce pingpong (but this is not to say that other
structures that are *not* internode annotated do *not* need to
worry about pingpong).
Put another way, big SMP P4 systems with !NUMA still want to have
128 byte aligned variables. I think it should just default to
L1_CACHE_SHIFT unless the special case of vsmp.
But other than that complaint (which was not introduced by your
patch anyway) then this looks like a good cleanup to me, thanks.
> Finally, make sure the default value for X86_L1_CACHE_SHIFT, when
> X86_GENERIC is selected, is being seen before that for the individual
> CPU model options (other than on x86-64, where GENERIC_CPU is part of
> the choice construct, X86_GENERIC is a separate option on ix86).
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> Cc: Nick Piggin <npiggin@suse.de>
^ permalink raw reply
* Re: No analog audio for the Empire Dual Pen: request for help and suggestions!!!
From: Devin Heitmueller @ 2009-11-16 4:14 UTC (permalink / raw)
To: Andrea.Amorosi76@gmail.com
Cc: Douglas Schilling Landgraf, Linux Media Mailing List
In-Reply-To: <4AFFFE3E.8040604@gmail.com>
On Sun, Nov 15, 2009 at 8:12 AM, Andrea.Amorosi76@gmail.com
<Andrea.Amorosi76@gmail.com> wrote:
> I would like to solve this analog audio issue (this device would be useful
> in the future thanks to the 9 pin s-video input which, I think can take the
> output of an external dvb-t decoder so that to be able to see cripted
> digital tv or from consoles to play and use notebook display as a tv).
> Following the (little) expertise gained with the Dikom DK300, I think that
> the default_analog gpio is not correct for the device.
> Can I try with others gpio or a wrong gpio can phisically break the device?
> Otherwise how can I create a correct gpio for this device?
> Thank you,
> Andrea (Xwang was my nickname)
Hello Andrea,
To determine the correct analog_gpio, I typically do an analog capture
under Windows, and use sniffusb to determine how the GPIO register is
set at the time the analog video is being streamed.
http://www.pcausa.com/Utilities/UsbSnoop/
Generally speaking, you probably do not want to experiment toggling
the GPIOs individually, since you can have conditions such as the
digital demod running at the same time as the analog subsystem (which
would draw too much power).
It's worth noting also that it is entirely possible that a LEDs are
attached to GPIO pins as well (in regards to your other question about
the LED behavior).
Devin
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply
* trying to add rfkill support to realtek driver for rtl8192e
From: saurav barik @ 2009-11-16 4:13 UTC (permalink / raw)
To: linux-wireless
Hi,
I am trying to implement rfkill support for realtek driver for rtl8192e.
The realtek driver we are using is very much similar to the one in
kernel 2.6.31.5(linux-2.6.31.5/drivers/staging/rtl8192su).
In order to use "wiphy_rfkill_set_hw_state", I need "struct wiphy"
which in turn is a part of "ieee80211_hw" structure.
However ieee80211_hw is not used in our driver.
Is the usage of 80211_hw is obsolete?
Without having the above structure how can I use the rfkill interface?
Anybody aware of this, please share some pointers.
Thanks for your time.
Regards,
Saurav
^ permalink raw reply
* [PATCH 1/1] add Settings property description to dataconnectionmanger-api.txt
From: Martin Xu @ 2009-11-16 4:05 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1821 bytes --]
---
doc/dataconnectionmanager-api.txt | 35 +++++++++++++++++++++++------------
1 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/doc/dataconnectionmanager-api.txt b/doc/dataconnectionmanager-api.txt
index 41fc02f..7afdf99 100644
--- a/doc/dataconnectionmanager-api.txt
+++ b/doc/dataconnectionmanager-api.txt
@@ -161,24 +161,35 @@ Properties boolean Activated [readwrite]
purposes. This value cannot be changed when the
context is active.
- string Interface [readonly, optional]
+ dict Settings [readonly, optonal]
- Holds the interface of the network interface created
- by this context (e.g. "ppp0")
+ Holds all the IP network settings
- string Address [readonly, optional]
+ string Interface [readonly, optional]
- Holds the IP address for this context.
+ Holds the interface of the network interface used
+ by this context (e.g. "ppp0" "usb0")
- string Netmask [readonly, optional]
+ string Method [readonly, optional]
- Holds the Netmask for this context.
+ Holds the IP network config method
+ "static"- Set IP network statically
+ "dhcp" - Set IP network through DHCP
- array{string} DomainNameServers [readonly, optional]
+ string Address [readonly, optional]
- Holds the list of domain name servers for this
- context.
+ Holds the IP address for this context.
- string Gateway [readonly, optional]
+ string Netmask [readonly, optional]
+
+ Holds the Netmask for this context.
+
+ array{string} DomainNameServers [readonly, optional]
+
+ Holds the list of domain name servers for this
+ context.
+
+ string Gateway [readonly, optional]
+
+ Holds the gateway IP for this connection.
- Holds the gateway IP for this connection.
--
1.6.1.3
^ permalink raw reply related
* Re: [PATCH] [RFC] checkpoint/restart timerfd
From: Matt Helsley @ 2009-11-16 4:04 UTC (permalink / raw)
To: Matt Helsley; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
In-Reply-To: <96703bfb68e1626100dd5fa6ce033ec204bcb58b.1258159772.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
On Fri, Nov 13, 2009 at 04:49:35PM -0800, Matt Helsley wrote:
> Support checkpoint/restart of timers specified via timerfd. Checkpoint
> essentially does the timerfd_gettime() syscall and saves the expired flags
> and tick count. This ensures there will be no lost expirations/ticks
> between checkpoint restart.
>
> This should largely work as expected since the time returned from gettime
> is always relative.
>
> However, like any time-sensitive state, timerfds set with TFD_TIMER_ABSTIME
> may expire/tick at the "wrong time" because that time has long since passed.
> Short of introducing time namespaces there's almost nothing that can be done
> to checkpoint these uses of timerfd. Would it make more sense to mark timerfds
> which were (re)set with TFD_TIMER_ABSTIME and refuse to checkpoint them rather
> than deliver a "best-effort" expiration/tick?
>
> Signed-off-by: Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> --
> NOTE: Compiles, untested.
> ---
> fs/timerfd.c | 113 ++++++++++++++++++++++++++++++++++++----
Argh. Missed the "restore" path which requires installing a handler for
these files in checkpoint/file.c. Fixed.
I also switched to __s64 values to keep the times in nanoseconds rather
than a timespec analog. This makes it more similar to the code in
checkpoint/signal.c (found this when looking for pieces to share in the
itimer checkpoint code).
Cheers,
-Matt Helsley
^ permalink raw reply
* Re: [PATCH 2/2] [RFC] checkpoint/restart signalfd
From: Matt Helsley @ 2009-11-16 4:01 UTC (permalink / raw)
To: Matt Helsley; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
In-Reply-To: <aa65242a98bf851a1d8432dd21850391c91607cf.1258153503.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
On Fri, Nov 13, 2009 at 03:05:05PM -0800, Matt Helsley wrote:
<snip>
> ---
> checkpoint/signal.c | 10 ------
> fs/signalfd.c | 62 ++++++++++++++++++++++++++++++++++++++++
Argh. Missed the "restore" path which requires installing a handler for
these files in checkpoint/file.c. Fixed.
Cheers,
-Matt Helsley
^ permalink raw reply
* Re: PROBLEM: "lost interrupt (Status 0x50)" from DVD drive, long wait on 2.6.31 till 2.6.32rc6
From: Erik Postma @ 2009-11-16 3:57 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
In-Reply-To: <d4db24520911150535pc4cddbufe86713cb317d7c9@mail.gmail.com>
2009/11/15 Erik Postma <e.j.postma+linux-ide@gmail.com>:
> (...)
> [7.7.] Other information that might be relevant to the problem
> (please look in /proc and include all information that you
> think to be relevant):
>
> Here's dmesg:
> (...)
Just now I had a boot where it did something different; here's what I
guess is the relevant part of dmesg. This is the same kernel and of
course the same hardware as described in the earlier email. Does the
fact that it's unpredictable mean there's possibly hardware issues?
Still have not seen any sign of trouble on 2.6.30 or earlier.
[ 1.344085] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 1.352564] ata1.00: ATA-7: Hitachi HTS541680J9SA00, SB2OC7DP, max
UDMA/100
[ 1.352617] ata1.00: 156301488 sectors, multi 16: LBA48 NCQ (depth
0/32)
[ 1.368586] ata1.00: configured for UDMA/100
[ 1.368800] scsi 0:0:0:0: Direct-Access ATA Hitachi
HTS54168 SB2O PQ: 0 ANSI: 5
[ 1.369155] sd 0:0:0:0: [sda] 156301488 512-byte logical blocks:
(80.0 GB/74.5 GiB)
[ 1.369269] sd 0:0:0:0: [sda] Write Protect is off
[ 1.369322] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 1.369350] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[ 1.369564] sda:
[ 1.369847] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1.660046] usb 2-1: new low speed USB device using ohci_hcd and
address 2
[ 1.688065] ata2: SATA link down (SStatus 0 SControl 300)
[ 1.756716] sda1 sda2 sda3 < sda5 sda6 >
[ 1.794512] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.852642] ata4.00: ATAPI: MATSHITADVD-RAM UJ-850S, 1.10, max
UDMA/33
[ 1.868615] ata4.00: configured for UDMA/33
[ 1.871398] scsi 3:0:0:0: CD-ROM MATSHITA DVD-RAM
UJ-850S 1.10 PQ: 0 ANSI: 5
[ 1.872289] usb 2-1: configuration #1 chosen from 1 choice
[ 6.872066] ata4.00: qc timeout (cmd 0xa0)
[ 6.872123] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 6.872183] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 6.872184] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 6.872186] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 6.872337] ata4.00: status: { DRDY ERR }
[ 6.872417] ata4: soft resetting link
[ 7.052604] ata4.00: configured for UDMA/33
[ 7.053051] ata4: EH complete
[ 12.052066] ata4.00: qc timeout (cmd 0xa0)
[ 12.052122] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 12.052180] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 12.052181] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 12.052183] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 12.052334] ata4.00: status: { DRDY ERR }
[ 12.052411] ata4: soft resetting link
[ 12.232604] ata4.00: configured for UDMA/33
[ 12.233062] ata4: EH complete
[ 17.232063] ata4.00: qc timeout (cmd 0xa0)
[ 17.232118] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 17.232176] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 17.232178] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 17.232179] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 17.232330] ata4.00: status: { DRDY ERR }
[ 17.232408] ata4: soft resetting link
[ 17.412604] ata4.00: configured for UDMA/33
[ 17.413063] ata4: EH complete
[ 22.412063] ata4.00: qc timeout (cmd 0xa0)
[ 22.412119] ata4.00: limiting speed to UDMA/25:PIO4
[ 22.412169] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 22.412227] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 22.412228] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 22.412230] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 22.412381] ata4.00: status: { DRDY ERR }
[ 22.412458] ata4: soft resetting link
[ 22.592604] ata4.00: configured for UDMA/25
[ 22.593049] ata4: EH complete
[ 27.592063] ata4.00: qc timeout (cmd 0xa0)
[ 27.592118] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 27.592176] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 27.592178] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 27.592179] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 27.592330] ata4.00: status: { DRDY ERR }
[ 27.592407] ata4: soft resetting link
[ 27.772604] ata4.00: configured for UDMA/25
[ 27.773093] ata4: EH complete
[ 32.772064] ata4.00: qc timeout (cmd 0xa0)
[ 32.772119] ata4.00: limiting speed to PIO4
[ 32.772167] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 32.772225] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 32.772227] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 32.772228] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 32.772379] ata4.00: status: { DRDY ERR }
[ 32.772457] ata4: soft resetting link
[ 32.952604] ata4.00: configured for PIO4
[ 32.953048] ata4: EH complete
[ 37.952064] ata4.00: qc timeout (cmd 0xa0)
[ 37.952118] ata4.00: limiting speed to PIO3
[ 37.952167] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 37.952225] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 37.952226] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 37.952228] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 37.952379] ata4.00: status: { DRDY ERR }
[ 37.952456] ata4: soft resetting link
[ 38.132603] ata4.00: configured for PIO3
[ 38.133046] ata4: EH complete
[ 43.132063] ata4.00: qc timeout (cmd 0xa0)
[ 43.132118] ata4.00: limiting speed to PIO0
[ 43.132166] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 43.132224] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 43.132226] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 43.132227] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 43.132378] ata4.00: status: { DRDY ERR }
[ 43.132455] ata4: soft resetting link
[ 43.312660] ata4.00: configured for PIO0
[ 43.313124] ata4: EH complete
[ 48.312066] ata4.00: qc timeout (cmd 0xa0)
[ 48.312122] ata4.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action
0x6 frozen
[ 48.312180] ata4.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
[ 48.312181] cdb 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
[ 48.312183] res 51/20:03:00:00:00/00:00:00:00:00/a0 Emask
0x5 (timeout)
[ 48.312334] ata4.00: status: { DRDY ERR }
[ 48.312411] ata4: soft resetting link
[ 48.492661] ata4.00: configured for PIO0
[ 48.493113] ata4: EH complete
[ 48.494341] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw
xa/form2 cdda tray
[ 48.494398] Uniform CD-ROM driver Revision: 3.20
[ 48.494628] sr 3:0:0:0: Attached scsi CD-ROM sr0
[ 48.494746] sr 3:0:0:0: Attached scsi generic sg1 type 5
[ 48.494822] Freeing unused kernel memory: 568k freed
[ 48.495415] Write protecting the kernel text: 4532k
[ 48.495503] Write protecting the kernel read-only data: 1880k
Thanks,
Erik Postma.
^ permalink raw reply
* RAID 5 rebuild fails with power interruption.
From: senthilkumar.muthukalai @ 2009-11-16 3:56 UTC (permalink / raw)
To: linux-raid
Adding a subject line...
-----Original Message-----
From: SenthilKumar Muthukalai (WT01 - Telecom Equipment)
Sent: Monday, November 16, 2009 9:14 AM
To: linux-raid@vger.kernel.org
Subject:
Hi All,
Could you pls help me out with the below problem?
1. Created a RAID5 with 3 disks.
2. Initial rebuild done.
3. Pulled out a disk from the array.
4. The array got degraded.
5. Added the disk back to the array with 'assemble' command.
6. The disk was successfully added and the array started rebuilding
again.
7. While rebuilding, reset the power to the NAS box.
8. When the NAS box boot up, the RAID was in degraded with the added
disk thrown out.
9. The boot messages say 'kicking out of the non-fresh disk from the
array'.
We tried '--force' option with the 'assemble' command but no success.
Thanks,
Senthil M
^ permalink raw reply
* Re: [Printing-architecture] [Gimp-print-devel] [Openicc] Colour
From: Chris Murphy @ 2009-11-16 3:53 UTC (permalink / raw)
To: Michael Sweet; +Cc: printing-architecture, gimp-print-devel, openicc
In-Reply-To: <D365548B-A95D-4233-B810-5F0B291C6308@apple.com>
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
On Nov 15, 2009, at 4:33 PM, Michael Sweet wrote:
> Well, last time *I* tried to print a target on Windows I had the same Epson driver problems that you'll find on Mac OS X - the Epson color controls were still used, making the target print useless.
It is true that on Windows the user should choose a different LUT than the default which on current drivers is Epson Standard (sRGB). But the printed target isn't useless. You'll actually make a profile that works correctly, although it is restricted in gamut. However, in-gamut colors reproduce correctly.
The problem I'm referring to that does not happen on Windows is ICM getting involved when it's not asked to. That's been a regular problem on OS X, even if it's manifested itself in different ways.
Chris Murphy
[-- Attachment #2: Type: text/html, Size: 4917 bytes --]
^ permalink raw reply
* Re: [PATCH] x86: Don't put iommu_shutdown_noop() in init section
From: FUJITA Tomonori @ 2009-11-16 3:49 UTC (permalink / raw)
To: h-shimamoto; +Cc: mingo, tglx, hpa, fujita.tomonori, linux-kernel
In-Reply-To: <4B00BC8E.50801@ct.jp.nec.com>
On Mon, 16 Nov 2009 11:44:30 +0900
Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> wrote:
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
>
> It causes kernel panic on shutdown or reboot.
>
> Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
> ---
> arch/x86/kernel/x86_init.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Duh, sorry about that.
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
^ permalink raw reply
* Re: [PATCH] xfs: improve metadata I/O merging in the elevator
From: Dave Chinner @ 2009-11-16 3:50 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
In-Reply-To: <20091112190930.GB32110@infradead.org>
On Thu, Nov 12, 2009 at 02:09:31PM -0500, Christoph Hellwig wrote:
> I had the patch below from Dave in my queue for a while, but previously
> couldn't really reproduce his numbers. After some discussions of the
> bio types I've reteseted it again and can see constant improvements when
> using cfq on my large array box with it (5-10% for the sequential create
> workloads), but still nothing on deadline. Given that people also want
> it for better marking in blktrace it might be time to put it in.
>
> Comments?
Definitely should be done, but....
It looks like the patch you posted isn't quite doing what was
intended - async write buffers are being classified as WRITE, not
WRITE_META. That means we get more write combining in the elevator
(performance increase) like with WRITE_META, but don't get the
faster dispatch (latency reduction) by using the META queue to keep
the metadata writeback separate from the bulk data writeback.
That may be why deadline is not showing any improvement...
FWIW, the original patch here:
http://oss.sgi.com/archives/xfs/2008-01/msg00630.html
uses WRITE_META, but it looks like you've taken bits of this
patch:
http://oss.sgi.com/archives/xfs/2008-01/msg00653.html
and added the log buffer marking to this patch and accidentally
dropped the WRITE_META marking. i.e. this:
> + } else if (bp->b_flags & _XBF_RUN_QUEUES) {
> + ASSERT(!(bp->b_flags & XBF_READ_AHEAD));
> + bp->b_flags &= ~_XBF_RUN_QUEUES;
> + rw = (bp->b_flags & XBF_WRITE) ? WRITE : READ_META;
I think should be:
+ rw = (bp->b_flags & XBF_WRITE) ? WRITE_META : READ_META;
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply
* (unknown),
From: senthilkumar.muthukalai @ 2009-11-16 3:44 UTC (permalink / raw)
To: linux-raid
Hi All,
Could you pls help me out with the below problem?
1. Created a RAID5 with 3 disks.
2. Initial rebuild done.
3. Pulled out a disk from the array.
4. The array got degraded.
5. Added the disk back to the array with 'assemble' command.
6. The disk was successfully added and the array started rebuilding
again.
7. While rebuilding, reset the power to the NAS box.
8. When the NAS box boot up, the RAID was in degraded with the added
disk thrown out.
9. The boot messages say 'kicking out of the non-fresh disk from the
array'.
We tried '--force' option with the 'assemble' command but no success.
Could you pls share your thought on this?
Thanks,
Senthil M
^ permalink raw reply
* [BUG]2.6.27.y some contents lost after writing to mmaped file
From: JiSheng Zhang @ 2009-11-16 3:38 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-mm, stable, gregkh
Hi,
I triggered a failure in an fs test with fsx-linux from ltp. It seems that
fsx-linux failed at mmap->write sequence.
Tested kernel is 2.6.27.12 and 2.6.27.39
Tested file system: ext3, tmpfs.
IMHO, it impacts all file systems.
Some fsx-linux log is:
READ BAD DATA: offset = 0x2771b, size = 0xa28e
OFFSET GOOD BAD RANGE
0x287e0 0x35c9 0x15a9 0x80
operation# (mod 256) for the bad datamay be 21
...
7828: 1257514978.306753 READ 0x23dba thru 0x25699 (0x18e0 bytes)
7829: 1257514978.306899 MAPWRITE 0x27eeb thru 0x2a516 (0x262c bytes)
******WWWW
7830: 1257514978.307504 READ 0x2771b thru 0x319a8 (0xa28e bytes)
***RRRR***
Correct content saved for comparison
...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* [BUG]2.6.27.y some contents lost after writing to mmaped file
From: JiSheng Zhang @ 2009-11-16 3:38 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-mm, stable, gregkh
Hi,
I triggered a failure in an fs test with fsx-linux from ltp. It seems that
fsx-linux failed at mmap->write sequence.
Tested kernel is 2.6.27.12 and 2.6.27.39
Tested file system: ext3, tmpfs.
IMHO, it impacts all file systems.
Some fsx-linux log is:
READ BAD DATA: offset = 0x2771b, size = 0xa28e
OFFSET GOOD BAD RANGE
0x287e0 0x35c9 0x15a9 0x80
operation# (mod 256) for the bad datamay be 21
...
7828: 1257514978.306753 READ 0x23dba thru 0x25699 (0x18e0 bytes)
7829: 1257514978.306899 MAPWRITE 0x27eeb thru 0x2a516 (0x262c bytes)
******WWWW
7830: 1257514978.307504 READ 0x2771b thru 0x319a8 (0xa28e bytes)
***RRRR***
Correct content saved for comparison
...
^ permalink raw reply
* Re: Preserving empty directories when doing a git-svn clone/rebase
From: Eric Wong @ 2009-11-16 3:32 UTC (permalink / raw)
To: Steven J. Murdoch; +Cc: git
In-Reply-To: <20091115020605.GE15966@cl.cam.ac.uk>
"Steven J. Murdoch" <git+Steven.Murdoch@cl.cam.ac.uk> wrote:
> When git-svn clones a Subversion repository, any empty directories
> appear to be silently dropped (tested using git version 1.6.5.2 on Mac
> OS X Snow Leopard). This causes problems for using git with software
> projects which depend on Subversion's ability to track empty
> directories. I was recently caught out by this, and it was difficult
> to debug what had gone wrong.
>
> Would it be possible to change git-svn to handle this case? Since git
> doesn't have the ability to track empty directories, probably the
> simplest thing to do would be to automatically add a file (e.g.
> .gitignore) to any empty directories. In theory this could cause
> problems, but I would think the chances of this are far lower than
> with the current behaviour.
Hi Steven,
The problem is that some git-svn using folks have started using
.gitignore to create empty directories on their own. Dealing with
conflicts like this is very problematic because we have to know
if the .gitignore file is supposed to be committed up to SVN or
not (it can be quite expensive to check).
Attempting to deal with mismatching the information stored in the git
index and SVN nearly made my head explode when I tried to implement
svn:externals support via git submodules. Fortunately I stopped in
time, but the mental scars still remain.
> I think this feature would help projects in which some contributors
> are transitioning to git. It would especially be useful to novice
> users of git, who are not aware of the potential problems with having
> empty directories.
>
> I see there was a discussion in 2006:
> http://kerneltrap.org/mailarchive/git/2006/11/29/231586
>
> However, since then I haven't seen any updates. The rationale behind
> the original request still seems applicable today:
>
> "I think there are many potential git users out there who are
> currently svn users. And git-svn is a really nice way to get started,
> but this sort of stumbling block could really turn people off. For
> example, it made me look pretty dumb when I carelessly complained to
> my colleague about his code not working and then it turns out to be
> because my super-advanced scm tool "messed things up"."
> (git-svn and empty directories in svn (was: [PATCH 1.2/2 (fixed)]
> git-svn: fix output reporting from the delta fetcher))
Shortly afterwards, git svn started logging unhandled information into
unhandled.log files. I hoped that somebody would write a parser for
those log files to be able to recreate useful information from them.
Since I'm lazy, forgetful and absent-minded, I never got around to it
until now.
Let me know how it works and if the "git svn mkdirs" command name makes
sense. Thanks for reminding me :)
>From 023675791988373beab921ad3ada115b2c224edf Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Sun, 15 Nov 2009 18:57:16 -0800
Subject: [PATCH] git svn: attempt to create empty dirs on clone+rebase
Attempt to parse unhandled.log files for empty_dir statements
and make a best effort attempt to recreate empty directories
on fresh clones and rebase.
This cannot affect "normal" git commands like "checkout" or
"reset", so users switching between branches in a single working
directory should use the new "git svn mkdirs" command after
switching branches.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
Documentation/git-svn.txt | 7 +++
git-svn.perl | 45 ++++++++++++++++
t/t9115-git-svn-dcommit-funky-renames.sh | 4 +-
t/t9146-git-svn-empty-dirs.sh | 85 ++++++++++++++++++++++++++++++
4 files changed, 139 insertions(+), 2 deletions(-)
create mode 100755 t/t9146-git-svn-empty-dirs.sh
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 1812890..db00ed4 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -320,6 +320,13 @@ Any other arguments are passed directly to 'git log'
directories. The output is suitable for appending to
the $GIT_DIR/info/exclude file.
+'mkdirs'::
+ Attempts to recreate empty directories that core git cannot track
+ based on information in $GIT_DIR/svn/<refname>/unhandled.log files.
+ Empty directories are automatically recreated when using
+ "git svn clone" and "git svn rebase", so "mkdirs" is intended
+ for use after commands like "git checkout" or "git reset".
+
'commit-diff'::
Commits the diff of two tree-ish arguments from the
command-line. This command does not rely on being inside an `git svn
diff --git a/git-svn.perl b/git-svn.perl
index ea922ac..ab0a8dd 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -168,6 +168,9 @@ my %cmd = (
'Create a .gitignore per svn:ignore',
{ 'revision|r=i' => \$_revision
} ],
+ 'mkdirs' => [ \&cmd_mkdirs ,
+ "recreate empty directories after a checkout",
+ { 'revision|r=i' => \$_revision } ],
'propget' => [ \&cmd_propget,
'Print the value of a property on a file or directory',
{ 'revision|r=i' => \$_revision } ],
@@ -769,6 +772,7 @@ sub cmd_rebase {
$_fetch_all ? $gs->fetch_all : $gs->fetch;
}
command_noisy(rebase_cmd(), $gs->refname);
+ $gs->mkemptydirs;
}
sub cmd_show_ignore {
@@ -830,6 +834,12 @@ sub cmd_create_ignore {
});
}
+sub cmd_mkdirs {
+ my ($url, $rev, $uuid, $gs) = working_head_info('HEAD');
+ $gs ||= Git::SVN->new;
+ $gs->mkemptydirs($_revision);
+}
+
sub canonicalize_path {
my ($path) = @_;
my $dot_slash_added = 0;
@@ -1196,6 +1206,7 @@ sub post_fetch_checkout {
command_noisy(qw/read-tree -m -u -v HEAD HEAD/);
print STDERR "Checked out HEAD:\n ",
$gs->full_url, " r", $gs->last_rev, "\n";
+ $gs->mkemptydirs($gs->last_rev);
}
sub complete_svn_url {
@@ -2724,6 +2735,34 @@ sub do_fetch {
$self->make_log_entry($rev, \@parents, $ed);
}
+sub mkemptydirs {
+ my ($self, $r) = @_;
+ my %empty_dirs = ();
+
+ open my $fh, '<', "$self->{dir}/unhandled.log" or return;
+ binmode $fh or croak "binmode: $!";
+ while (<$fh>) {
+ if (defined $r && /^r(\d+)$/) {
+ last if $1 > $r;
+ } elsif (/^ \+empty_dir: (.+)$/) {
+ $empty_dirs{$1} = 1;
+ } elsif (/^ \-empty_dir: (.+)$/) {
+ delete $empty_dirs{$1};
+ }
+ }
+ close $fh;
+ foreach my $d (sort keys %empty_dirs) {
+ $d = uri_decode($d);
+ next if -d $d;
+ if (-e _) {
+ warn "$d exists but is not a directory\n";
+ } else {
+ print "creating empty directory: $d\n";
+ mkpath([$d]);
+ }
+ }
+}
+
sub get_untracked {
my ($self, $ed) = @_;
my @out;
@@ -3556,6 +3595,12 @@ sub uri_encode {
$f
}
+sub uri_decode {
+ my ($f) = @_;
+ $f =~ s#%([0-9a-fA-F]{2})#chr(hex($1))#eg;
+ $f
+}
+
sub remove_username {
$_[0] =~ s{^([^:]*://)[^@]+@}{$1};
}
diff --git a/t/t9115-git-svn-dcommit-funky-renames.sh b/t/t9115-git-svn-dcommit-funky-renames.sh
index 9be7aef..767799e 100755
--- a/t/t9115-git-svn-dcommit-funky-renames.sh
+++ b/t/t9115-git-svn-dcommit-funky-renames.sh
@@ -19,7 +19,7 @@ test_expect_success 'init and fetch repository' '
'
test_expect_success 'create file in existing ugly and empty dir' '
- mkdir "#{bad_directory_name}" &&
+ mkdir -p "#{bad_directory_name}" &&
echo hi > "#{bad_directory_name}/ foo" &&
git update-index --add "#{bad_directory_name}/ foo" &&
git commit -m "new file in ugly parent" &&
@@ -37,7 +37,7 @@ test_expect_success 'rename pretty file' '
git update-index --add pretty &&
git commit -m "pretty :x" &&
git svn dcommit &&
- mkdir regular_dir_name &&
+ mkdir -p regular_dir_name &&
git mv pretty regular_dir_name/pretty &&
git commit -m "moved pretty file" &&
git svn dcommit
diff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh
new file mode 100755
index 0000000..5948544
--- /dev/null
+++ b/t/t9146-git-svn-empty-dirs.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 Eric Wong
+
+test_description='git svn creates empty directories'
+. ./lib-git-svn.sh
+
+test_expect_success 'initialize repo' '
+ for i in a b c d d/e d/e/f "weird file name"
+ do
+ svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i"
+ done
+'
+
+test_expect_success 'clone' 'git svn clone "$svnrepo" cloned'
+
+test_expect_success 'empty directories exist' '
+ (
+ cd cloned &&
+ for i in a b c d d/e d/e/f "weird file name"
+ do
+ if ! test -d "$i"
+ then
+ echo >&2 "$i does not exist"
+ exit 1
+ fi
+ done
+ )
+'
+
+test_expect_success 'more emptiness' '
+ svn_cmd mkdir -m "bang bang" "$svnrepo"/"! !"
+'
+
+test_expect_success 'git svn rebase creates empty directory' '
+ ( cd cloned && git svn rebase )
+ test -d cloned/"! !"
+'
+
+test_expect_success 'git svn mkdirs recreates empty directories' '
+ (
+ cd cloned &&
+ rm -r * &&
+ git svn mkdirs &&
+ for i in a b c d d/e d/e/f "weird file name" "! !"
+ do
+ if ! test -d "$i"
+ then
+ echo >&2 "$i does not exist"
+ exit 1
+ fi
+ done
+ )
+'
+
+test_expect_success 'git svn mkdirs -r works' '
+ (
+ cd cloned &&
+ rm -r * &&
+ git svn mkdirs -r7 &&
+ for i in a b c d d/e d/e/f "weird file name"
+ do
+ if ! test -d "$i"
+ then
+ echo >&2 "$i does not exist"
+ exit 1
+ fi
+ done
+
+ if test -d "! !"
+ then
+ echo >&2 "$i should not exist"
+ exit 1
+ fi
+
+ git svn mkdirs -r8 &&
+ if ! test -d "! !"
+ then
+ echo >&2 "$i not exist"
+ exit 1
+ fi
+ )
+'
+
+test_done
--
Eric Wong
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.