diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-12-17 20:16:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 16:52:36 -0500 |
commit | 006ef0ec96de0dec01064df86febbc813f23c96a (patch) | |
tree | ed0ef542980fae684af0ccac72838c2b17c3a6fe | |
parent | 8da3dc28753ece6b7ddae9d5897a0ad0797e21e6 (diff) |
Staging: frontier: remove unused alphatrack_sysfs.c file
The alphatrack_sysfs.c is unused, so remove it.
Cc: David Taht <d@teklibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/frontier/alphatrack.c | 24 | ||||
-rw-r--r-- | drivers/staging/frontier/alphatrack_sysfs.c | 279 |
2 files changed, 0 insertions, 303 deletions
diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c index efc2345a676b..028873e70fe9 100644 --- a/drivers/staging/frontier/alphatrack.c +++ b/drivers/staging/frontier/alphatrack.c | |||
@@ -82,7 +82,6 @@ MODULE_SUPPORTED_DEVICE("Frontier Designs Alphatrack Control Surface"); | |||
82 | 82 | ||
83 | /* These aren't done yet */ | 83 | /* These aren't done yet */ |
84 | 84 | ||
85 | #define ALPHATRACK_HAVE_SYSFS 0 | ||
86 | #define SUPPRESS_EXTRA_ONLINE_EVENTS 0 | 85 | #define SUPPRESS_EXTRA_ONLINE_EVENTS 0 |
87 | #define BUFFERED_WRITES 0 | 86 | #define BUFFERED_WRITES 0 |
88 | #define SUPPRESS_EXTRA_OFFLINE_EVENTS 0 | 87 | #define SUPPRESS_EXTRA_OFFLINE_EVENTS 0 |
@@ -232,12 +231,6 @@ static void usb_alphatrack_abort_transfers(struct usb_alphatrack *dev) | |||
232 | usb_kill_urb(dev->interrupt_out_urb); | 231 | usb_kill_urb(dev->interrupt_out_urb); |
233 | } | 232 | } |
234 | 233 | ||
235 | #if ALPHATRACK_HAVE_SYSFS | ||
236 | /* lots and lots and lots of sysfs stuff */ | ||
237 | /* Currently borked, probably useless */ | ||
238 | #include "alphatrack_sysfs.c" | ||
239 | #endif | ||
240 | |||
241 | /** | 234 | /** |
242 | * usb_alphatrack_delete | 235 | * usb_alphatrack_delete |
243 | */ | 236 | */ |
@@ -800,23 +793,6 @@ static int usb_alphatrack_probe(struct usb_interface *intf, const struct usb_dev | |||
800 | dev_info(&intf->dev, "Alphatrack Device #%d now attached to major %d minor %d\n", | 793 | dev_info(&intf->dev, "Alphatrack Device #%d now attached to major %d minor %d\n", |
801 | (intf->minor - USB_ALPHATRACK_MINOR_BASE), USB_MAJOR, intf->minor); | 794 | (intf->minor - USB_ALPHATRACK_MINOR_BASE), USB_MAJOR, intf->minor); |
802 | 795 | ||
803 | #if ALPHATRACK_HAVE_SYSFS | ||
804 | if((retval = device_create_file(&intf->dev, &dev_attr_event))) goto error; | ||
805 | if((retval = device_create_file(&intf->dev, &dev_attr_dump_state))) goto error; | ||
806 | if((retval = device_create_file(&intf->dev, &dev_attr_enable))) goto error; | ||
807 | if((retval = device_create_file(&intf->dev, &dev_attr_offline))) goto error; | ||
808 | |||
809 | /* exercise sysfs */ | ||
810 | |||
811 | set_lights("32767"); // turn on all the lights | ||
812 | set_fader0("1023"); // Move fader to max | ||
813 | set_screen("INITIALIZING ALPHATRACK..."); | ||
814 | set_lights("0"); | ||
815 | set_fader0("0"); | ||
816 | set_screen(" "); | ||
817 | |||
818 | #endif | ||
819 | |||
820 | exit: | 796 | exit: |
821 | return retval; | 797 | return retval; |
822 | 798 | ||
diff --git a/drivers/staging/frontier/alphatrack_sysfs.c b/drivers/staging/frontier/alphatrack_sysfs.c deleted file mode 100644 index 21af6a2d70bb..000000000000 --- a/drivers/staging/frontier/alphatrack_sysfs.c +++ /dev/null | |||
@@ -1,279 +0,0 @@ | |||
1 | /* This was an attempt - ultimately proved pointless - at making a full fledged sysfs interface to the alphatrack */ | ||
2 | /* won't even compile at present */ | ||
3 | |||
4 | char *alphatrack_sys_margs; | ||
5 | spinlock_t alphatrack_sys_margs_lock; | ||
6 | |||
7 | struct alphatrack_attr { | ||
8 | struct attribute attr; | ||
9 | ssize_t (*show)(struct device *, char *); | ||
10 | ssize_t (*store)(struct device *, const char *, size_t); | ||
11 | }; | ||
12 | |||
13 | #define ALPHATRACK_ATTR(name, mode, show, store) \ | ||
14 | static struct alphatrack_attr alphatrack_attr_##name = __ATTR(name, mode, show, store) | ||
15 | |||
16 | /* now a great deal of callback code generation */ | ||
17 | |||
18 | // FOREACH_LIGHT(show_set_light) | ||
19 | // FOREACH_BUTTON(show_set_button) | ||
20 | |||
21 | show_set_light(LIGHT_RECORD); show_set_light(LIGHT_EQ); show_set_light(LIGHT_OUT); | ||
22 | show_set_light(LIGHT_F2); show_set_light(LIGHT_SEND); show_set_light(LIGHT_IN); | ||
23 | show_set_light(LIGHT_F1); show_set_light(LIGHT_PAN); show_set_light(LIGHT_UNDEF1); | ||
24 | show_set_light(LIGHT_UNDEF2); show_set_light(LIGHT_SHIFT); show_set_light(LIGHT_TRACKMUTE); | ||
25 | show_set_light(LIGHT_TRACKSOLO); show_set_light(LIGHT_TRACKREC); show_set_light(LIGHT_READ); | ||
26 | show_set_light(LIGHT_WRITE); show_set_light(LIGHT_ANYSOLO); show_set_light(LIGHT_AUTO); | ||
27 | show_set_light(LIGHT_F4); show_set_light(LIGHT_RECORD); show_set_light(LIGHT_WINDOW); | ||
28 | show_set_light(LIGHT_PLUGIN); show_set_light(LIGHT_F3); show_set_light(LIGHT_LOOP); | ||
29 | |||
30 | show_set_opt(enable); show_set_opt(offline); show_set_opt(compress_fader); show_set_opt(dump_state); | ||
31 | show_set_int(fader); show_set_int(event); | ||
32 | |||
33 | |||
34 | static ssize_t show_lights(struct device *dev, struct device_attribute *attr, char *buf) | ||
35 | { | ||
36 | struct usb_interface *intf = to_usb_interface(dev); | ||
37 | struct usb_alphatrack *t = usb_get_intfdata(intf); | ||
38 | return sprintf(buf, "%d\n", t->lights); | ||
39 | } | ||
40 | |||
41 | static ssize_t set_lights(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | ||
42 | { | ||
43 | struct usb_interface *intf = to_usb_interface(dev); | ||
44 | struct usb_alphatrack *t = usb_get_intfdata(intf); | ||
45 | int temp = simple_strtoul(buf, NULL, 10); | ||
46 | t->lights = temp; | ||
47 | return count; | ||
48 | } | ||
49 | |||
50 | static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_lights, set_lights); | ||
51 | |||
52 | |||
53 | ALPHATRACK_ATTR(LightRecord, 0200, NULL, LightRecord_store); | ||
54 | |||
55 | static struct attribute *alphatrack_attrs[] = { | ||
56 | &alphatrack_attr_LightRecord.attr, | ||
57 | NULL, | ||
58 | }; | ||
59 | |||
60 | static ssize_t alphatrack_attr_show(struct kobject *kobj, struct attribute *attr, | ||
61 | char *buf) | ||
62 | { | ||
63 | struct device *sdp = container_of(kobj, struct device, kobj); | ||
64 | struct alphatrack_attr *a = container_of(attr, struct alphatrack_attr, attr); | ||
65 | return a->show ? a->show(sdp, buf) : 0; | ||
66 | } | ||
67 | |||
68 | static ssize_t alphatrack_attr_store(struct kobject *kobj, struct attribute *attr, | ||
69 | const char *buf, size_t len) | ||
70 | { | ||
71 | struct device *sdp = container_of(kobj, struct device, kobj); | ||
72 | struct alphatrack_attr *a = container_of(attr, struct alphatrack_attr, attr); | ||
73 | return a->store ? a->store(sdp, buf, len) : len; | ||
74 | } | ||
75 | |||
76 | static struct sysfs_ops alphatrack_attr_ops = { | ||
77 | .show = alphatrack_attr_show, | ||
78 | .store = alphatrack_attr_store, | ||
79 | }; | ||
80 | |||
81 | static struct kobj_type alphatrack_ktype = { | ||
82 | .default_attrs = alphatrack_attrs, | ||
83 | .sysfs_ops = &alphatrack_attr_ops, | ||
84 | }; | ||
85 | |||
86 | static struct kset alphatrack_kset = { | ||
87 | .subsys = &fs_subsys, | ||
88 | .kobj = {.name = "alphatrack"}, | ||
89 | .ktype = &alphatrack_ktype, | ||
90 | }; | ||
91 | |||
92 | |||
93 | static struct attribute *lights_attrs[] = { | ||
94 | &tune_attr_demote_secs.attr, | ||
95 | NULL, | ||
96 | }; | ||
97 | |||
98 | |||
99 | static struct attribute_group leds_group = { | ||
100 | .name = "leds", | ||
101 | .attrs = lights_attrs, | ||
102 | }; | ||
103 | |||
104 | static struct attribute_group faders_group = { | ||
105 | .name = "faders", | ||
106 | .attrs = faders_attrs, | ||
107 | }; | ||
108 | |||
109 | static struct attribute_group lcds_group = { | ||
110 | .name = "lcds", | ||
111 | .attrs = lcds_attrs, | ||
112 | }; | ||
113 | |||
114 | static struct attribute_group wheels_group = { | ||
115 | .name = "wheels", | ||
116 | .attrs = wheels_attrs, | ||
117 | }; | ||
118 | |||
119 | static struct attribute_group touchsurfaces_group = { | ||
120 | .name = "touchsurfaces", | ||
121 | .attrs = touchsurfaces_attrs, | ||
122 | }; | ||
123 | |||
124 | static struct attribute_group buttons_group = { | ||
125 | .name = "buttons", | ||
126 | .attrs = buttons_attrs, | ||
127 | }; | ||
128 | |||
129 | |||
130 | int alphatrack_sys_fs_add(struct device *sdp) | ||
131 | { | ||
132 | int error; | ||
133 | |||
134 | sdp->kobj.kset = &alphatrack_kset; | ||
135 | sdp->kobj.ktype = &alphatrack_ktype; | ||
136 | |||
137 | // error = kobject_set_name(&sdp->kobj, "%s", sdp->sd_table_name); | ||
138 | error = kobject_set_name(&sdp->kobj, "%s", "alphatrack"); | ||
139 | if (error) | ||
140 | goto fail; | ||
141 | |||
142 | error = kobject_register(&sdp->kobj); | ||
143 | if (error) | ||
144 | goto fail; | ||
145 | |||
146 | error = sysfs_create_group(&sdp->kobj, &lcds_group); | ||
147 | if (error) | ||
148 | goto fail_reg; | ||
149 | |||
150 | error = sysfs_create_group(&sdp->kobj, &leds_group); | ||
151 | if (error) | ||
152 | goto fail_leds; | ||
153 | |||
154 | error = sysfs_create_group(&sdp->kobj, &wheels_group); | ||
155 | if (error) | ||
156 | goto fail_wheels; | ||
157 | |||
158 | error = sysfs_create_group(&sdp->kobj, &faders_group); | ||
159 | if (error) | ||
160 | goto fail_lcds; | ||
161 | |||
162 | error = sysfs_create_group(&sdp->kobj, &buttons_group); | ||
163 | if (error) | ||
164 | goto fail_faders; | ||
165 | |||
166 | error = sysfs_create_group(&sdp->kobj, &touchsurfaces_group); | ||
167 | if (error) | ||
168 | goto fail_buttons; | ||
169 | |||
170 | return 0; | ||
171 | |||
172 | |||
173 | fail_buttons: | ||
174 | sysfs_remove_group(&sdp->kobj, &buttons_group); | ||
175 | fail_faders: | ||
176 | sysfs_remove_group(&sdp->kobj, &faders_group); | ||
177 | fail_wheels: | ||
178 | sysfs_remove_group(&sdp->kobj, &wheels_group); | ||
179 | fail_lcds: | ||
180 | sysfs_remove_group(&sdp->kobj, &lcds_group); | ||
181 | fail_leds: | ||
182 | sysfs_remove_group(&sdp->kobj, &leds_group); | ||
183 | |||
184 | |||
185 | |||
186 | fail_reg: | ||
187 | kobject_unregister(&sdp->kobj); | ||
188 | fail: | ||
189 | fs_err(sdp, "error %d adding sysfs files", error); | ||
190 | return error; | ||
191 | } | ||
192 | |||
193 | // int sysfs_create_link(struct kobject *kobj, | ||
194 | // struct kobject *target, | ||
195 | // char *name); | ||
196 | |||
197 | void alphatrack_sys_fs_del(struct device *sdp) | ||
198 | { | ||
199 | sysfs_remove_group(&sdp->kobj, &touchsurfaces_group); | ||
200 | sysfs_remove_group(&sdp->kobj, &buttons_group); | ||
201 | sysfs_remove_group(&sdp->kobj, &faders_group); | ||
202 | sysfs_remove_group(&sdp->kobj, &lcds_group); | ||
203 | sysfs_remove_group(&sdp->kobj, &wheels_group); | ||
204 | sysfs_remove_group(&sdp->kobj, &leds_group) | ||
205 | //void sysfs_remove_link(struct kobject *kobj, char *name); | ||
206 | kobject_unregister(&sdp->kobj); | ||
207 | } | ||
208 | |||
209 | int alphatrack_sys_init(void) | ||
210 | { | ||
211 | alphatrack_sys_margs = NULL; | ||
212 | spin_lock_init(&alphatrack_sys_margs_lock); | ||
213 | return kset_register(&alphatrack_kset); | ||
214 | } | ||
215 | |||
216 | void alphatrack_sys_uninit(void) | ||
217 | { | ||
218 | kfree(alphatrack_sys_margs); | ||
219 | kset_unregister(&alphatrack_kset); | ||
220 | } | ||
221 | |||
222 | |||
223 | //decl_subsys(char *name, struct kobj_type *type, | ||
224 | // struct kset_hotplug_ops *hotplug_ops); | ||
225 | |||
226 | /* End of all the crazy sysfs stuff */ | ||
227 | |||
228 | #define SYSEX_INQUIRE signed char *SYSEX_INQUIRE[] = { 0xf0,0x7e,0x00,0x06,0x01,0x17 }; | ||
229 | |||
230 | #define COMMAND(NAME,CONT_NAME) { BUTTONMASK_##NAME, ((0x90 << 8) | CONT_NAME), ((0x90 << 8) | CONT_NAME), #NAME, NAME ## _set } | ||
231 | #define ROTARY(NAME,CONT_NAME) { FADER_##NAME, ((0xb0 << 8) | CONT_NAME), ((0xb0 << 8) | CONT_NAME), #NAME, NAME ## _set } | ||
232 | #define SPOSITION(NAME,CONT_NAME) { BUTTON_##NAME ((0xe9 << 8) | CONT_NAME), #NAME, NAME ## _set } | ||
233 | #define ENDCOMMAND { 0,NULL,0,NULL,NULL} | ||
234 | |||
235 | /* Now that we've generated all our callbacks */ | ||
236 | |||
237 | static struct buttonmap_t buttonmap[] = | ||
238 | { | ||
239 | COMMAND (REWIND,0x5b), | ||
240 | COMMAND (FASTFORWARD,0x5c), | ||
241 | COMMAND (STOP,0x5d), | ||
242 | COMMAND (PLAY,0x5e), | ||
243 | COMMAND (RECORD,0x5f), | ||
244 | COMMAND (SHIFT,0x46), | ||
245 | COMMAND (TRACKLEFT,0x57), | ||
246 | COMMAND (TRACKRIGHT,0x58), | ||
247 | COMMAND (LOOP,0x56), | ||
248 | COMMAND (FLIP,0x32), | ||
249 | COMMAND (MUTE,0x10), | ||
250 | COMMAND (F1,0x36), | ||
251 | COMMAND (F2,0x37), | ||
252 | COMMAND (F3,0x38), | ||
253 | COMMAND (F4,0x39), | ||
254 | COMMAND (SOLO,0x08), | ||
255 | COMMAND (ANY,0x73), | ||
256 | COMMAND (PAN,0x2a), | ||
257 | COMMAND (SEND,0x29), | ||
258 | COMMAND (EQ,0x2c), | ||
259 | COMMAND (PLUGIN,0x2b), | ||
260 | COMMAND (AUTO,0x4a), | ||
261 | COMMAND (TRACKREC,0x00), | ||
262 | COMMAND (FOOTSWITCH1,0x67), | ||
263 | COMMAND (KNOBTOUCH1,0x78), | ||
264 | COMMAND (KNOBPUSH1,0x20), | ||
265 | ROTARY (KNOBTURN1,0x10), | ||
266 | COMMAND (KNOBTOUCH2,0x79), | ||
267 | COMMAND (KNOBPUSH2,0x21), | ||
268 | ROTARY (KNOBTURN2,0x11), | ||
269 | COMMAND (KNOBTOUCH3,0x7a), | ||
270 | COMMAND (KNOBPUSH3,0x22), | ||
271 | ROTARY (KNOBTURN3,0x12), | ||
272 | COMMAND (FADERTOUCH1,0x68), | ||
273 | COMMAND (STRIPTOUCH1,0x74), | ||
274 | COMMAND (STRIPTOUCH2,0x6b), | ||
275 | SPOSITION (STRIPPOS1,0x00), | ||
276 | ENDCOMMAND | ||
277 | }; | ||
278 | |||
279 | |||