Commit 52913ab2c6f760c2af9f9396765ce8fa1a2baf17

Authored by Bartlomiej Zolnierkiewicz
1 parent f094d4d83b

ide-generic: remove no longer needed sysfs interface

Nowadays we have "ide_generic.probe_mask=" module parameter
and ide_platform host driver so sysfs interface for adding
IDE interfaces is no longer needed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Showing 1 changed file with 1 additions and 67 deletions Side-by-side Diff

drivers/ide/ide-generic.c
1 1 /*
2 2 * generic/default IDE host driver
3 3 *
4   - * Copyright (C) 2004, 2008 Bartlomiej Zolnierkiewicz
  4 + * Copyright (C) 2004, 2008-2009 Bartlomiej Zolnierkiewicz
5 5 * This code was split off from ide.c. See it for original copyrights.
6 6 *
7 7 * May be copied or modified under the terms of the GNU General Public License.
8 8 */
9 9  
10   -/*
11   - * For special cases new interfaces may be added using sysfs, i.e.
12   - *
13   - * echo -n "0x168:0x36e:10" > /sys/class/ide_generic/add
14   - *
15   - * will add an interface using I/O ports 0x168-0x16f/0x36e and IRQ 10.
16   - */
17   -
18 10 #include <linux/kernel.h>
19 11 #include <linux/init.h>
20 12 #include <linux/module.h>
... ... @@ -36,60 +28,6 @@
36 28 .host_flags = IDE_HFLAG_NO_DMA,
37 29 };
38 30  
39   -static ssize_t store_add(struct class *cls, const char *buf, size_t n)
40   -{
41   - unsigned int base, ctl;
42   - int irq, rc;
43   - hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
44   -
45   - if (sscanf(buf, "%x:%x:%d", &base, &ctl, &irq) != 3)
46   - return -EINVAL;
47   -
48   - memset(&hw, 0, sizeof(hw));
49   - ide_std_init_ports(&hw, base, ctl);
50   - hw.irq = irq;
51   - hw.chipset = ide_generic;
52   -
53   - rc = ide_host_add(&ide_generic_port_info, hws, NULL);
54   - if (rc)
55   - return rc;
56   -
57   - return n;
58   -};
59   -
60   -static struct class_attribute ide_generic_class_attrs[] = {
61   - __ATTR(add, S_IWUSR, NULL, store_add),
62   - __ATTR_NULL
63   -};
64   -
65   -static void ide_generic_class_release(struct class *cls)
66   -{
67   - kfree(cls);
68   -}
69   -
70   -static int __init ide_generic_sysfs_init(void)
71   -{
72   - struct class *cls;
73   - int rc;
74   -
75   - cls = kzalloc(sizeof(*cls), GFP_KERNEL);
76   - if (!cls)
77   - return -ENOMEM;
78   -
79   - cls->name = DRV_NAME;
80   - cls->owner = THIS_MODULE;
81   - cls->class_release = ide_generic_class_release;
82   - cls->class_attrs = ide_generic_class_attrs;
83   -
84   - rc = class_register(cls);
85   - if (rc) {
86   - kfree(cls);
87   - return rc;
88   - }
89   -
90   - return 0;
91   -}
92   -
93 31 #if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \
94 32 || defined(CONFIG_PLAT_OPSPUT)
95 33 static const u16 legacy_bases[] = { 0x1f0 };
... ... @@ -195,10 +133,6 @@
195 133 }
196 134 }
197 135 }
198   -
199   - if (ide_generic_sysfs_init())
200   - printk(KERN_ERR DRV_NAME ": failed to create ide_generic "
201   - "class\n");
202 136  
203 137 return rc;
204 138 }