diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-28 01:40:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 17:54:25 -0400 |
commit | 9a92fadcc6731de03d6bdcf8fbfce08533d13523 (patch) | |
tree | ad758accdf109f7709f38785c3418e2f1caa7c80 | |
parent | 6efc5667ef588df7156e1c481383f8dbff4fa409 (diff) |
Staging: line6: fix checkpatch errors in control.c
1 error left, but it's minor.
Lots of warnings also fixed up.
Cc: Markus Grabner <grabner@icg.tugraz.at>
Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/line6/control.c | 358 |
1 files changed, 247 insertions, 111 deletions
diff --git a/drivers/staging/line6/control.c b/drivers/staging/line6/control.c index 76e521222e78..23ad08e17f84 100644 --- a/drivers/staging/line6/control.c +++ b/drivers/staging/line6/control.c | |||
@@ -18,8 +18,8 @@ | |||
18 | #include "usbdefs.h" | 18 | #include "usbdefs.h" |
19 | #include "variax.h" | 19 | #include "variax.h" |
20 | 20 | ||
21 | #define DEVICE_ATTR2(_name1,_name2,_mode,_show,_store) \ | 21 | #define DEVICE_ATTR2(_name1, _name2, _mode, _show, _store) \ |
22 | struct device_attribute dev_attr_##_name1 = __ATTR(_name2,_mode,_show,_store) | 22 | struct device_attribute dev_attr_##_name1 = __ATTR(_name2, _mode, _show, _store) |
23 | 23 | ||
24 | #define LINE6_PARAM_R(PREFIX, prefix, type, param) \ | 24 | #define LINE6_PARAM_R(PREFIX, prefix, type, param) \ |
25 | static ssize_t prefix ## _get_ ## param(struct device *dev, \ | 25 | static ssize_t prefix ## _get_ ## param(struct device *dev, \ |
@@ -47,7 +47,8 @@ static ssize_t pod_get_param_int(struct device *dev, char *buf, int param) | |||
47 | struct usb_interface *interface = to_usb_interface(dev); | 47 | struct usb_interface *interface = to_usb_interface(dev); |
48 | struct usb_line6_pod *pod = usb_get_intfdata(interface); | 48 | struct usb_line6_pod *pod = usb_get_intfdata(interface); |
49 | int retval = line6_wait_dump(&pod->dumpreq, 0); | 49 | int retval = line6_wait_dump(&pod->dumpreq, 0); |
50 | if(retval < 0) return retval; | 50 | if (retval < 0) |
51 | return retval; | ||
51 | return sprintf(buf, "%d\n", pod->prog_data.control[param]); | 52 | return sprintf(buf, "%d\n", pod->prog_data.control[param]); |
52 | } | 53 | } |
53 | 54 | ||
@@ -65,17 +66,18 @@ static ssize_t variax_get_param_int(struct device *dev, char *buf, int param) | |||
65 | struct usb_interface *interface = to_usb_interface(dev); | 66 | struct usb_interface *interface = to_usb_interface(dev); |
66 | struct usb_line6_variax *variax = usb_get_intfdata(interface); | 67 | struct usb_line6_variax *variax = usb_get_intfdata(interface); |
67 | int retval = line6_wait_dump(&variax->dumpreq, 0); | 68 | int retval = line6_wait_dump(&variax->dumpreq, 0); |
68 | if(retval < 0) return retval; | 69 | if (retval < 0) |
70 | return retval; | ||
69 | return sprintf(buf, "%d\n", variax->model_data.control[param]); | 71 | return sprintf(buf, "%d\n", variax->model_data.control[param]); |
70 | } | 72 | } |
71 | 73 | ||
72 | static ssize_t variax_get_param_float(struct device *dev, char *buf, int param) | 74 | static ssize_t variax_get_param_float(struct device *dev, char *buf, int param) |
73 | { | 75 | { |
74 | /* | 76 | /* |
75 | We do our own floating point handling here since floats in the kernel are | 77 | We do our own floating point handling here since floats in the |
76 | problematic for at least two reasons: | 78 | kernel are problematic for at least two reasons: - many distros |
77 | - many distros are still shipped with binary kernels optimized for the | 79 | are still shipped with binary kernels optimized for the ancient |
78 | ancient 80386 without FPU | 80 | 80386 without FPU |
79 | - there isn't a printf("%f") | 81 | - there isn't a printf("%f") |
80 | (see http://www.kernelthread.com/publications/faq/335.html) | 82 | (see http://www.kernelthread.com/publications/faq/335.html) |
81 | */ | 83 | */ |
@@ -90,20 +92,20 @@ static ssize_t variax_get_param_float(struct device *dev, char *buf, int param) | |||
90 | struct usb_line6_variax *variax = usb_get_intfdata(interface); | 92 | struct usb_line6_variax *variax = usb_get_intfdata(interface); |
91 | const unsigned char *p = variax->model_data.control + param; | 93 | const unsigned char *p = variax->model_data.control + param; |
92 | int retval = line6_wait_dump(&variax->dumpreq, 0); | 94 | int retval = line6_wait_dump(&variax->dumpreq, 0); |
93 | if(retval < 0) return retval; | 95 | if (retval < 0) |
96 | return retval; | ||
94 | 97 | ||
95 | if((p[0] == 0) && (p[1] == 0) && (p[2] == 0)) | 98 | if ((p[0] == 0) && (p[1] == 0) && (p[2] == 0)) |
96 | part_int = part_frac = 0; | 99 | part_int = part_frac = 0; |
97 | else { | 100 | else { |
98 | int exponent = (((p[0] & 0x7f) << 1) | (p[1] >> 7)) - BIAS; | 101 | int exponent = (((p[0] & 0x7f) << 1) | (p[1] >> 7)) - BIAS; |
99 | unsigned mantissa = (p[1] << 8) | p[2] | 0x8000; | 102 | unsigned mantissa = (p[1] << 8) | p[2] | 0x8000; |
100 | exponent -= OFFSET; | 103 | exponent -= OFFSET; |
101 | 104 | ||
102 | if(exponent >= 0) { | 105 | if (exponent >= 0) { |
103 | part_int = mantissa << exponent; | 106 | part_int = mantissa << exponent; |
104 | part_frac = 0; | 107 | part_frac = 0; |
105 | } | 108 | } else { |
106 | else { | ||
107 | part_int = mantissa >> -exponent; | 109 | part_int = mantissa >> -exponent; |
108 | part_frac = (mantissa << (32 + exponent)) & 0xffffffff; | 110 | part_frac = (mantissa << (32 + exponent)) & 0xffffffff; |
109 | } | 111 | } |
@@ -399,28 +401,39 @@ static DEVICE_ATTR(mix2, S_IRUGO, variax_get_mix2, line6_nop_write); | |||
399 | static DEVICE_ATTR(mix1, S_IRUGO, variax_get_mix1, line6_nop_write); | 401 | static DEVICE_ATTR(mix1, S_IRUGO, variax_get_mix1, line6_nop_write); |
400 | static DEVICE_ATTR(pickup_wiring, S_IRUGO, variax_get_pickup_wiring, line6_nop_write); | 402 | static DEVICE_ATTR(pickup_wiring, S_IRUGO, variax_get_pickup_wiring, line6_nop_write); |
401 | 403 | ||
402 | int pod_create_files(int firmware, int type, struct device *dev) { | 404 | int pod_create_files(int firmware, int type, struct device *dev) |
405 | { | ||
403 | int err; | 406 | int err; |
404 | CHECK_RETURN(device_create_file(dev, &dev_attr_tweak)); | 407 | CHECK_RETURN(device_create_file(dev, &dev_attr_tweak)); |
405 | CHECK_RETURN(device_create_file(dev, &dev_attr_wah_position)); | 408 | CHECK_RETURN(device_create_file(dev, &dev_attr_wah_position)); |
406 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_compression_gain)); | 409 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
410 | CHECK_RETURN(device_create_file(dev, &dev_attr_compression_gain)); | ||
407 | CHECK_RETURN(device_create_file(dev, &dev_attr_vol_pedal_position)); | 411 | CHECK_RETURN(device_create_file(dev, &dev_attr_vol_pedal_position)); |
408 | CHECK_RETURN(device_create_file(dev, &dev_attr_compression_threshold)); | 412 | CHECK_RETURN(device_create_file(dev, &dev_attr_compression_threshold)); |
409 | CHECK_RETURN(device_create_file(dev, &dev_attr_pan)); | 413 | CHECK_RETURN(device_create_file(dev, &dev_attr_pan)); |
410 | CHECK_RETURN(device_create_file(dev, &dev_attr_amp_model_setup)); | 414 | CHECK_RETURN(device_create_file(dev, &dev_attr_amp_model_setup)); |
411 | if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_amp_model)); | 415 | if (firmware >= 200) |
416 | CHECK_RETURN(device_create_file(dev, &dev_attr_amp_model)); | ||
412 | CHECK_RETURN(device_create_file(dev, &dev_attr_drive)); | 417 | CHECK_RETURN(device_create_file(dev, &dev_attr_drive)); |
413 | CHECK_RETURN(device_create_file(dev, &dev_attr_bass)); | 418 | CHECK_RETURN(device_create_file(dev, &dev_attr_bass)); |
414 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_mid)); | 419 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
415 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_lowmid)); | 420 | CHECK_RETURN(device_create_file(dev, &dev_attr_mid)); |
416 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_treble)); | 421 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
417 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_highmid)); | 422 | CHECK_RETURN(device_create_file(dev, &dev_attr_lowmid)); |
423 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
424 | CHECK_RETURN(device_create_file(dev, &dev_attr_treble)); | ||
425 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
426 | CHECK_RETURN(device_create_file(dev, &dev_attr_highmid)); | ||
418 | CHECK_RETURN(device_create_file(dev, &dev_attr_chan_vol)); | 427 | CHECK_RETURN(device_create_file(dev, &dev_attr_chan_vol)); |
419 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_mix)); | 428 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
429 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_mix)); | ||
420 | CHECK_RETURN(device_create_file(dev, &dev_attr_effect_setup)); | 430 | CHECK_RETURN(device_create_file(dev, &dev_attr_effect_setup)); |
421 | if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_frequency)); | 431 | if (firmware >= 200) |
422 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_presence)); | 432 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_frequency)); |
423 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_treble__bass)); | 433 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
434 | CHECK_RETURN(device_create_file(dev, &dev_attr_presence)); | ||
435 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
436 | CHECK_RETURN(device_create_file(dev, &dev_attr_treble__bass)); | ||
424 | CHECK_RETURN(device_create_file(dev, &dev_attr_noise_gate_enable)); | 437 | CHECK_RETURN(device_create_file(dev, &dev_attr_noise_gate_enable)); |
425 | CHECK_RETURN(device_create_file(dev, &dev_attr_gate_threshold)); | 438 | CHECK_RETURN(device_create_file(dev, &dev_attr_gate_threshold)); |
426 | CHECK_RETURN(device_create_file(dev, &dev_attr_gate_decay_time)); | 439 | CHECK_RETURN(device_create_file(dev, &dev_attr_gate_decay_time)); |
@@ -431,102 +444,168 @@ int pod_create_files(int firmware, int type, struct device *dev) { | |||
431 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1)); | 444 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1)); |
432 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1)); | 445 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1)); |
433 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1_note_value)); | 446 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1_note_value)); |
434 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_frequency__bass)); | 447 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
448 | if (firmware >= 200) | ||
449 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_frequency__bass)); | ||
435 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_2)); | 450 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_2)); |
436 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_volume_mix)); | 451 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_volume_mix)); |
437 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_3)); | 452 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_3)); |
438 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_enable)); | 453 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
439 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_type)); | 454 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_enable)); |
440 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_decay)); | 455 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
441 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_tone)); | 456 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_type)); |
442 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_pre_delay)); | 457 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
443 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_pre_post)); | 458 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_decay)); |
444 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_frequency)); | 459 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
445 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_frequency__bass)); | 460 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_tone)); |
461 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
462 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_pre_delay)); | ||
463 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
464 | CHECK_RETURN(device_create_file(dev, &dev_attr_reverb_pre_post)); | ||
465 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
466 | if (firmware >= 200) | ||
467 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_frequency)); | ||
468 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
469 | if (firmware >= 200) | ||
470 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_frequency__bass)); | ||
446 | CHECK_RETURN(device_create_file(dev, &dev_attr_wah_enable)); | 471 | CHECK_RETURN(device_create_file(dev, &dev_attr_wah_enable)); |
447 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_lo_cut)); | 472 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
448 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_delay_reverb_lo_cut)); | 473 | CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_lo_cut)); |
449 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pedal_minimum)); | 474 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
450 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_eq_pre_post)); | 475 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_reverb_lo_cut)); |
476 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
477 | if (firmware >= 200) | ||
478 | CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pedal_minimum)); | ||
479 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
480 | if (firmware >= 200) | ||
481 | CHECK_RETURN(device_create_file(dev, &dev_attr_eq_pre_post)); | ||
451 | CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pre_post)); | 482 | CHECK_RETURN(device_create_file(dev, &dev_attr_volume_pre_post)); |
452 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_di_model)); | 483 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
453 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_di_delay)); | 484 | CHECK_RETURN(device_create_file(dev, &dev_attr_di_model)); |
485 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
486 | CHECK_RETURN(device_create_file(dev, &dev_attr_di_delay)); | ||
454 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_enable)); | 487 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_enable)); |
455 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1_note_value)); | 488 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1_note_value)); |
456 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_2)); | 489 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_2)); |
457 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_3)); | 490 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_3)); |
458 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_4)); | 491 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_4)); |
459 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_5)); | 492 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
493 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_5)); | ||
460 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_volume_mix)); | 494 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_volume_mix)); |
461 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_pre_post)); | 495 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_pre_post)); |
462 | CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_model)); | 496 | CHECK_RETURN(device_create_file(dev, &dev_attr_modulation_model)); |
463 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_frequency)); | 497 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
464 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_frequency__bass)); | 498 | if (firmware >= 200) |
499 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_frequency)); | ||
500 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
501 | if (firmware >= 200) | ||
502 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_frequency__bass)); | ||
465 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1_double_precision)); | 503 | CHECK_RETURN(device_create_file(dev, &dev_attr_mod_param_1_double_precision)); |
466 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1_double_precision)); | 504 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_1_double_precision)); |
467 | if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_eq_enable)); | 505 | if (firmware >= 200) |
506 | CHECK_RETURN(device_create_file(dev, &dev_attr_eq_enable)); | ||
468 | CHECK_RETURN(device_create_file(dev, &dev_attr_tap)); | 507 | CHECK_RETURN(device_create_file(dev, &dev_attr_tap)); |
469 | CHECK_RETURN(device_create_file(dev, &dev_attr_volume_tweak_pedal_assign)); | 508 | CHECK_RETURN(device_create_file(dev, &dev_attr_volume_tweak_pedal_assign)); |
470 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_5_frequency)); | 509 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
510 | if (firmware >= 200) | ||
511 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_5_frequency)); | ||
471 | CHECK_RETURN(device_create_file(dev, &dev_attr_tuner)); | 512 | CHECK_RETURN(device_create_file(dev, &dev_attr_tuner)); |
472 | CHECK_RETURN(device_create_file(dev, &dev_attr_mic_selection)); | 513 | CHECK_RETURN(device_create_file(dev, &dev_attr_mic_selection)); |
473 | CHECK_RETURN(device_create_file(dev, &dev_attr_cabinet_model)); | 514 | CHECK_RETURN(device_create_file(dev, &dev_attr_cabinet_model)); |
474 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_model)); | 515 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_model)); |
475 | CHECK_RETURN(device_create_file(dev, &dev_attr_roomlevel)); | 516 | CHECK_RETURN(device_create_file(dev, &dev_attr_roomlevel)); |
476 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_frequency)); | 517 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
477 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_6_frequency)); | 518 | if (firmware >= 200) |
519 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_frequency)); | ||
520 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
521 | if (firmware >= 200) | ||
522 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_6_frequency)); | ||
478 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_1_note_value)); | 523 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_1_note_value)); |
479 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_2)); | 524 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_2)); |
480 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_3)); | 525 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_3)); |
481 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_4)); | 526 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_4)); |
482 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_5)); | 527 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_5)); |
483 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_6)); | 528 | CHECK_RETURN(device_create_file(dev, &dev_attr_stomp_param_6)); |
484 | if((type & (LINE6_BITS_LIVE)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_amp_switch_select)); | 529 | if ((type & (LINE6_BITS_LIVE)) != 0) |
530 | CHECK_RETURN(device_create_file(dev, &dev_attr_amp_switch_select)); | ||
485 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_4)); | 531 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_4)); |
486 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_5)); | 532 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_param_5)); |
487 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_pre_post)); | 533 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_pre_post)); |
488 | if((type & (LINE6_BITS_PODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_delay_model)); | 534 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
489 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_delay_verb_model)); | 535 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_model)); |
536 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
537 | CHECK_RETURN(device_create_file(dev, &dev_attr_delay_verb_model)); | ||
490 | CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_msb)); | 538 | CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_msb)); |
491 | CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_lsb)); | 539 | CHECK_RETURN(device_create_file(dev, &dev_attr_tempo_lsb)); |
492 | if(firmware >= 300) CHECK_RETURN(device_create_file(dev, &dev_attr_wah_model)); | 540 | if (firmware >= 300) |
493 | if(firmware >= 214) CHECK_RETURN(device_create_file(dev, &dev_attr_bypass_volume)); | 541 | CHECK_RETURN(device_create_file(dev, &dev_attr_wah_model)); |
494 | if((type & (LINE6_BITS_PRO)) != 0) CHECK_RETURN(device_create_file(dev, &dev_attr_fx_loop_on_off)); | 542 | if (firmware >= 214) |
543 | CHECK_RETURN(device_create_file(dev, &dev_attr_bypass_volume)); | ||
544 | if ((type & (LINE6_BITS_PRO)) != 0) | ||
545 | CHECK_RETURN(device_create_file(dev, &dev_attr_fx_loop_on_off)); | ||
495 | CHECK_RETURN(device_create_file(dev, &dev_attr_tweak_param_select)); | 546 | CHECK_RETURN(device_create_file(dev, &dev_attr_tweak_param_select)); |
496 | CHECK_RETURN(device_create_file(dev, &dev_attr_amp1_engage)); | 547 | CHECK_RETURN(device_create_file(dev, &dev_attr_amp1_engage)); |
497 | if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_gain)); | 548 | if (firmware >= 200) |
498 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_gain__bass)); | 549 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_1_gain)); |
499 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_gain)); | 550 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
500 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_gain__bass)); | 551 | if (firmware >= 200) |
501 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_gain)); | 552 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_gain__bass)); |
502 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_gain__bass)); | 553 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
503 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_5_gain__bass)); | 554 | if (firmware >= 200) |
504 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_gain)); | 555 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_2_gain)); |
505 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) CHECK_RETURN(device_create_file(dev, &dev_attr_band_6_gain__bass)); | 556 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
557 | if (firmware >= 200) | ||
558 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_gain__bass)); | ||
559 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
560 | if (firmware >= 200) | ||
561 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_3_gain)); | ||
562 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
563 | if (firmware >= 200) | ||
564 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_gain__bass)); | ||
565 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
566 | if (firmware >= 200) | ||
567 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_5_gain__bass)); | ||
568 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
569 | if (firmware >= 200) | ||
570 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_4_gain)); | ||
571 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
572 | if (firmware >= 200) | ||
573 | CHECK_RETURN(device_create_file(dev, &dev_attr_band_6_gain__bass)); | ||
506 | return 0; | 574 | return 0; |
507 | } | 575 | } |
508 | 576 | ||
509 | void pod_remove_files(int firmware, int type, struct device *dev) { | 577 | void pod_remove_files(int firmware, int type, struct device *dev) |
578 | { | ||
510 | device_remove_file(dev, &dev_attr_tweak); | 579 | device_remove_file(dev, &dev_attr_tweak); |
511 | device_remove_file(dev, &dev_attr_wah_position); | 580 | device_remove_file(dev, &dev_attr_wah_position); |
512 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_compression_gain); | 581 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
582 | device_remove_file(dev, &dev_attr_compression_gain); | ||
513 | device_remove_file(dev, &dev_attr_vol_pedal_position); | 583 | device_remove_file(dev, &dev_attr_vol_pedal_position); |
514 | device_remove_file(dev, &dev_attr_compression_threshold); | 584 | device_remove_file(dev, &dev_attr_compression_threshold); |
515 | device_remove_file(dev, &dev_attr_pan); | 585 | device_remove_file(dev, &dev_attr_pan); |
516 | device_remove_file(dev, &dev_attr_amp_model_setup); | 586 | device_remove_file(dev, &dev_attr_amp_model_setup); |
517 | if(firmware >= 200) device_remove_file(dev, &dev_attr_amp_model); | 587 | if (firmware >= 200) |
588 | device_remove_file(dev, &dev_attr_amp_model); | ||
518 | device_remove_file(dev, &dev_attr_drive); | 589 | device_remove_file(dev, &dev_attr_drive); |
519 | device_remove_file(dev, &dev_attr_bass); | 590 | device_remove_file(dev, &dev_attr_bass); |
520 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_mid); | 591 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
521 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_lowmid); | 592 | device_remove_file(dev, &dev_attr_mid); |
522 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_treble); | 593 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
523 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_highmid); | 594 | device_remove_file(dev, &dev_attr_lowmid); |
595 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
596 | device_remove_file(dev, &dev_attr_treble); | ||
597 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
598 | device_remove_file(dev, &dev_attr_highmid); | ||
524 | device_remove_file(dev, &dev_attr_chan_vol); | 599 | device_remove_file(dev, &dev_attr_chan_vol); |
525 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_mix); | 600 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
601 | device_remove_file(dev, &dev_attr_reverb_mix); | ||
526 | device_remove_file(dev, &dev_attr_effect_setup); | 602 | device_remove_file(dev, &dev_attr_effect_setup); |
527 | if(firmware >= 200) device_remove_file(dev, &dev_attr_band_1_frequency); | 603 | if (firmware >= 200) |
528 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_presence); | 604 | device_remove_file(dev, &dev_attr_band_1_frequency); |
529 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_treble__bass); | 605 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
606 | device_remove_file(dev, &dev_attr_presence); | ||
607 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
608 | device_remove_file(dev, &dev_attr_treble__bass); | ||
530 | device_remove_file(dev, &dev_attr_noise_gate_enable); | 609 | device_remove_file(dev, &dev_attr_noise_gate_enable); |
531 | device_remove_file(dev, &dev_attr_gate_threshold); | 610 | device_remove_file(dev, &dev_attr_gate_threshold); |
532 | device_remove_file(dev, &dev_attr_gate_decay_time); | 611 | device_remove_file(dev, &dev_attr_gate_decay_time); |
@@ -537,84 +616,140 @@ void pod_remove_files(int firmware, int type, struct device *dev) { | |||
537 | device_remove_file(dev, &dev_attr_mod_param_1); | 616 | device_remove_file(dev, &dev_attr_mod_param_1); |
538 | device_remove_file(dev, &dev_attr_delay_param_1); | 617 | device_remove_file(dev, &dev_attr_delay_param_1); |
539 | device_remove_file(dev, &dev_attr_delay_param_1_note_value); | 618 | device_remove_file(dev, &dev_attr_delay_param_1_note_value); |
540 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_2_frequency__bass); | 619 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
620 | if (firmware >= 200) | ||
621 | device_remove_file(dev, &dev_attr_band_2_frequency__bass); | ||
541 | device_remove_file(dev, &dev_attr_delay_param_2); | 622 | device_remove_file(dev, &dev_attr_delay_param_2); |
542 | device_remove_file(dev, &dev_attr_delay_volume_mix); | 623 | device_remove_file(dev, &dev_attr_delay_volume_mix); |
543 | device_remove_file(dev, &dev_attr_delay_param_3); | 624 | device_remove_file(dev, &dev_attr_delay_param_3); |
544 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_enable); | 625 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
545 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_type); | 626 | device_remove_file(dev, &dev_attr_reverb_enable); |
546 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_decay); | 627 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
547 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_tone); | 628 | device_remove_file(dev, &dev_attr_reverb_type); |
548 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_pre_delay); | 629 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
549 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_reverb_pre_post); | 630 | device_remove_file(dev, &dev_attr_reverb_decay); |
550 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_2_frequency); | 631 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
551 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_3_frequency__bass); | 632 | device_remove_file(dev, &dev_attr_reverb_tone); |
633 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
634 | device_remove_file(dev, &dev_attr_reverb_pre_delay); | ||
635 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
636 | device_remove_file(dev, &dev_attr_reverb_pre_post); | ||
637 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
638 | if (firmware >= 200) | ||
639 | device_remove_file(dev, &dev_attr_band_2_frequency); | ||
640 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
641 | if (firmware >= 200) | ||
642 | device_remove_file(dev, &dev_attr_band_3_frequency__bass); | ||
552 | device_remove_file(dev, &dev_attr_wah_enable); | 643 | device_remove_file(dev, &dev_attr_wah_enable); |
553 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_modulation_lo_cut); | 644 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
554 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_delay_reverb_lo_cut); | 645 | device_remove_file(dev, &dev_attr_modulation_lo_cut); |
555 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_volume_pedal_minimum); | 646 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
556 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_eq_pre_post); | 647 | device_remove_file(dev, &dev_attr_delay_reverb_lo_cut); |
648 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
649 | if (firmware >= 200) | ||
650 | device_remove_file(dev, &dev_attr_volume_pedal_minimum); | ||
651 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
652 | if (firmware >= 200) | ||
653 | device_remove_file(dev, &dev_attr_eq_pre_post); | ||
557 | device_remove_file(dev, &dev_attr_volume_pre_post); | 654 | device_remove_file(dev, &dev_attr_volume_pre_post); |
558 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_di_model); | 655 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
559 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_di_delay); | 656 | device_remove_file(dev, &dev_attr_di_model); |
657 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
658 | device_remove_file(dev, &dev_attr_di_delay); | ||
560 | device_remove_file(dev, &dev_attr_mod_enable); | 659 | device_remove_file(dev, &dev_attr_mod_enable); |
561 | device_remove_file(dev, &dev_attr_mod_param_1_note_value); | 660 | device_remove_file(dev, &dev_attr_mod_param_1_note_value); |
562 | device_remove_file(dev, &dev_attr_mod_param_2); | 661 | device_remove_file(dev, &dev_attr_mod_param_2); |
563 | device_remove_file(dev, &dev_attr_mod_param_3); | 662 | device_remove_file(dev, &dev_attr_mod_param_3); |
564 | device_remove_file(dev, &dev_attr_mod_param_4); | 663 | device_remove_file(dev, &dev_attr_mod_param_4); |
565 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_mod_param_5); | 664 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
665 | device_remove_file(dev, &dev_attr_mod_param_5); | ||
566 | device_remove_file(dev, &dev_attr_mod_volume_mix); | 666 | device_remove_file(dev, &dev_attr_mod_volume_mix); |
567 | device_remove_file(dev, &dev_attr_mod_pre_post); | 667 | device_remove_file(dev, &dev_attr_mod_pre_post); |
568 | device_remove_file(dev, &dev_attr_modulation_model); | 668 | device_remove_file(dev, &dev_attr_modulation_model); |
569 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_3_frequency); | 669 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
570 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_4_frequency__bass); | 670 | if (firmware >= 200) |
671 | device_remove_file(dev, &dev_attr_band_3_frequency); | ||
672 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
673 | if (firmware >= 200) | ||
674 | device_remove_file(dev, &dev_attr_band_4_frequency__bass); | ||
571 | device_remove_file(dev, &dev_attr_mod_param_1_double_precision); | 675 | device_remove_file(dev, &dev_attr_mod_param_1_double_precision); |
572 | device_remove_file(dev, &dev_attr_delay_param_1_double_precision); | 676 | device_remove_file(dev, &dev_attr_delay_param_1_double_precision); |
573 | if(firmware >= 200) device_remove_file(dev, &dev_attr_eq_enable); | 677 | if (firmware >= 200) |
678 | device_remove_file(dev, &dev_attr_eq_enable); | ||
574 | device_remove_file(dev, &dev_attr_tap); | 679 | device_remove_file(dev, &dev_attr_tap); |
575 | device_remove_file(dev, &dev_attr_volume_tweak_pedal_assign); | 680 | device_remove_file(dev, &dev_attr_volume_tweak_pedal_assign); |
576 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_5_frequency); | 681 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
682 | if (firmware >= 200) | ||
683 | device_remove_file(dev, &dev_attr_band_5_frequency); | ||
577 | device_remove_file(dev, &dev_attr_tuner); | 684 | device_remove_file(dev, &dev_attr_tuner); |
578 | device_remove_file(dev, &dev_attr_mic_selection); | 685 | device_remove_file(dev, &dev_attr_mic_selection); |
579 | device_remove_file(dev, &dev_attr_cabinet_model); | 686 | device_remove_file(dev, &dev_attr_cabinet_model); |
580 | device_remove_file(dev, &dev_attr_stomp_model); | 687 | device_remove_file(dev, &dev_attr_stomp_model); |
581 | device_remove_file(dev, &dev_attr_roomlevel); | 688 | device_remove_file(dev, &dev_attr_roomlevel); |
582 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_4_frequency); | 689 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
583 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_6_frequency); | 690 | if (firmware >= 200) |
691 | device_remove_file(dev, &dev_attr_band_4_frequency); | ||
692 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
693 | if (firmware >= 200) | ||
694 | device_remove_file(dev, &dev_attr_band_6_frequency); | ||
584 | device_remove_file(dev, &dev_attr_stomp_param_1_note_value); | 695 | device_remove_file(dev, &dev_attr_stomp_param_1_note_value); |
585 | device_remove_file(dev, &dev_attr_stomp_param_2); | 696 | device_remove_file(dev, &dev_attr_stomp_param_2); |
586 | device_remove_file(dev, &dev_attr_stomp_param_3); | 697 | device_remove_file(dev, &dev_attr_stomp_param_3); |
587 | device_remove_file(dev, &dev_attr_stomp_param_4); | 698 | device_remove_file(dev, &dev_attr_stomp_param_4); |
588 | device_remove_file(dev, &dev_attr_stomp_param_5); | 699 | device_remove_file(dev, &dev_attr_stomp_param_5); |
589 | device_remove_file(dev, &dev_attr_stomp_param_6); | 700 | device_remove_file(dev, &dev_attr_stomp_param_6); |
590 | if((type & (LINE6_BITS_LIVE)) != 0) device_remove_file(dev, &dev_attr_amp_switch_select); | 701 | if ((type & (LINE6_BITS_LIVE)) != 0) |
702 | device_remove_file(dev, &dev_attr_amp_switch_select); | ||
591 | device_remove_file(dev, &dev_attr_delay_param_4); | 703 | device_remove_file(dev, &dev_attr_delay_param_4); |
592 | device_remove_file(dev, &dev_attr_delay_param_5); | 704 | device_remove_file(dev, &dev_attr_delay_param_5); |
593 | device_remove_file(dev, &dev_attr_delay_pre_post); | 705 | device_remove_file(dev, &dev_attr_delay_pre_post); |
594 | if((type & (LINE6_BITS_PODXTALL)) != 0) device_remove_file(dev, &dev_attr_delay_model); | 706 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
595 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) device_remove_file(dev, &dev_attr_delay_verb_model); | 707 | device_remove_file(dev, &dev_attr_delay_model); |
708 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
709 | device_remove_file(dev, &dev_attr_delay_verb_model); | ||
596 | device_remove_file(dev, &dev_attr_tempo_msb); | 710 | device_remove_file(dev, &dev_attr_tempo_msb); |
597 | device_remove_file(dev, &dev_attr_tempo_lsb); | 711 | device_remove_file(dev, &dev_attr_tempo_lsb); |
598 | if(firmware >= 300) device_remove_file(dev, &dev_attr_wah_model); | 712 | if (firmware >= 300) |
599 | if(firmware >= 214) device_remove_file(dev, &dev_attr_bypass_volume); | 713 | device_remove_file(dev, &dev_attr_wah_model); |
600 | if((type & (LINE6_BITS_PRO)) != 0) device_remove_file(dev, &dev_attr_fx_loop_on_off); | 714 | if (firmware >= 214) |
715 | device_remove_file(dev, &dev_attr_bypass_volume); | ||
716 | if ((type & (LINE6_BITS_PRO)) != 0) | ||
717 | device_remove_file(dev, &dev_attr_fx_loop_on_off); | ||
601 | device_remove_file(dev, &dev_attr_tweak_param_select); | 718 | device_remove_file(dev, &dev_attr_tweak_param_select); |
602 | device_remove_file(dev, &dev_attr_amp1_engage); | 719 | device_remove_file(dev, &dev_attr_amp1_engage); |
603 | if(firmware >= 200) device_remove_file(dev, &dev_attr_band_1_gain); | 720 | if (firmware >= 200) |
604 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_2_gain__bass); | 721 | device_remove_file(dev, &dev_attr_band_1_gain); |
605 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_2_gain); | 722 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
606 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_3_gain__bass); | 723 | if (firmware >= 200) |
607 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_3_gain); | 724 | device_remove_file(dev, &dev_attr_band_2_gain__bass); |
608 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_4_gain__bass); | 725 | if ((type & (LINE6_BITS_PODXTALL)) != 0) |
609 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_5_gain__bass); | 726 | if (firmware >= 200) |
610 | if((type & (LINE6_BITS_PODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_4_gain); | 727 | device_remove_file(dev, &dev_attr_band_2_gain); |
611 | if((type & (LINE6_BITS_BASSPODXTALL)) != 0) if(firmware >= 200) device_remove_file(dev, &dev_attr_band_6_gain__bass); | 728 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) |
729 | if (firmware >= 200) | ||
730 | device_remove_file(dev, &dev_attr_band_3_gain__bass); | ||
731 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
732 | if (firmware >= 200) | ||
733 | device_remove_file(dev, &dev_attr_band_3_gain); | ||
734 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
735 | if (firmware >= 200) | ||
736 | device_remove_file(dev, &dev_attr_band_4_gain__bass); | ||
737 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
738 | if (firmware >= 200) | ||
739 | device_remove_file(dev, &dev_attr_band_5_gain__bass); | ||
740 | if ((type & (LINE6_BITS_PODXTALL)) != 0) | ||
741 | if (firmware >= 200) | ||
742 | device_remove_file(dev, &dev_attr_band_4_gain); | ||
743 | if ((type & (LINE6_BITS_BASSPODXTALL)) != 0) | ||
744 | if (firmware >= 200) | ||
745 | device_remove_file(dev, &dev_attr_band_6_gain__bass); | ||
612 | } | 746 | } |
613 | 747 | ||
614 | EXPORT_SYMBOL(pod_create_files); | 748 | EXPORT_SYMBOL(pod_create_files); |
615 | EXPORT_SYMBOL(pod_remove_files); | 749 | EXPORT_SYMBOL(pod_remove_files); |
616 | 750 | ||
617 | int variax_create_files(int firmware, int type, struct device *dev) { | 751 | int variax_create_files(int firmware, int type, struct device *dev) |
752 | { | ||
618 | int err; | 753 | int err; |
619 | CHECK_RETURN(device_create_file(dev, &dev_attr_body)); | 754 | CHECK_RETURN(device_create_file(dev, &dev_attr_body)); |
620 | CHECK_RETURN(device_create_file(dev, &dev_attr_pickup1_enable)); | 755 | CHECK_RETURN(device_create_file(dev, &dev_attr_pickup1_enable)); |
@@ -658,7 +793,8 @@ int variax_create_files(int firmware, int type, struct device *dev) { | |||
658 | return 0; | 793 | return 0; |
659 | } | 794 | } |
660 | 795 | ||
661 | void variax_remove_files(int firmware, int type, struct device *dev) { | 796 | void variax_remove_files(int firmware, int type, struct device *dev) |
797 | { | ||
662 | device_remove_file(dev, &dev_attr_body); | 798 | device_remove_file(dev, &dev_attr_body); |
663 | device_remove_file(dev, &dev_attr_pickup1_enable); | 799 | device_remove_file(dev, &dev_attr_pickup1_enable); |
664 | device_remove_file(dev, &dev_attr_pickup1_type); | 800 | device_remove_file(dev, &dev_attr_pickup1_type); |