History

[PATCH] clockevents: remove bad designed sysfs support for now

The current sysfs support of clockevents does not obey the "only one value per file" rule. The real fix is not 2.6.21 material. Therefor remove the sysfs support for now.

Thomas Gleixner committed 19 years ago

Commit 291bc041 parent e0f2e3a1 file · +0 −69Browse files

Unified · Split

kernel/time/clockevents.c+0−69
@@ -274,72 +274,3 @@ void clockevents_notify(unsigned long reason, void *arg) · 273 unmodified lines
274274 }
275275 EXPORT_SYMBOL_GPL(clockevents_notify);
276276
277−#ifdef CONFIG_SYSFS
278−
279−/**
280− * clockevents_show_registered - sysfs interface for listing clockevents
281− * @dev: unused
282− * @buf: char buffer to be filled with clock events list
283− *
284− * Provides sysfs interface for listing registered clock event devices
285− */
286−static ssize_t clockevents_show_registered(struct sys_device *dev, char *buf)
287−{
288− struct list_head *tmp;
289− char *p = buf;
290− int cpu;
291−
292− spin_lock(&clockevents_lock);
293−
294− list_for_each(tmp, &clockevent_devices) {
295− struct clock_event_device *ce;
296−
297− ce = list_entry(tmp, struct clock_event_device, list);
298− p += sprintf(p, "%-20s F:%04x M:%d", ce->name,
299− ce->features, ce->mode);
300− p += sprintf(p, " C:");
301− if (!cpus_equal(ce->cpumask, cpu_possible_map)) {
302− for_each_cpu_mask(cpu, ce->cpumask)
303− p += sprintf(p, " %d", cpu);
304− } else {
305− /*
306− * FIXME: Add the cpu which is handling this sucker
307− */
308− }
309− p += sprintf(p, "\n");
310− }
311−
312− spin_unlock(&clockevents_lock);
313−
314− return p - buf;
315−}
316−
317−/*
318− * Sysfs setup bits:
319− */
320−static SYSDEV_ATTR(registered, 0600,
321− clockevents_show_registered, NULL);
322−
323−static struct sysdev_class clockevents_sysclass = {
324− set_kset_name("clockevents"),
325−};
326−
327−static struct sys_device clockevents_sys_device = {
328− .id = 0,
329− .cls = &clockevents_sysclass,
330−};
331−
332−static int __init clockevents_sysfs_init(void)
333−{
334− int error = sysdev_class_register(&clockevents_sysclass);
335−
336− if (!error)
337− error = sysdev_register(&clockevents_sys_device);
338− if (!error)
339− error = sysdev_create_file(
340− &clockevents_sys_device,
341− &attr_registered);
342− return error;
343−}
344−device_initcall(clockevents_sysfs_init);
345−#endif