Skip to contentSkip to conversation

ide: move sysfs support to ide-sysfs.c

PATCH In review Bartlomiej Zolnierkiewicz 1 participant 1 message Nov 12, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 ide: move sysfs support to ide-sysfs.c

While at it:
- media_string() -> ide_media_string()

There should be no functional changes caused by this patch.

---
 drivers/ide/Makefile    |    2 
 drivers/ide/ide-probe.c |   52 -------------------
 drivers/ide/ide-sysfs.c |  125 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/ide/ide.c       |   72 ---------------------------
 include/linux/ide.h     |    4 +
 5 files changed, 132 insertions(+), 123 deletions(-)
drivers/ide/Makefile +1 -1
Index: b/drivers/ide/Makefile
===================================================================
@@ -5,7 +5,7 @@
 EXTRA_CFLAGS				+= -Idrivers/ide
 
 ide-core-y += ide.o ide-ioctls.o ide-io.o ide-iops.o ide-lib.o ide-probe.o \
-	      ide-taskfile.o ide-pm.o ide-park.o ide-pio-blacklist.o
+	      ide-taskfile.o ide-pm.o ide-park.o ide-pio-blacklist.o ide-sysfs.o
 
 # core IDE code
 ide-core-$(CONFIG_IDE_TIMINGS)		+= ide-timings.o
drivers/ide/ide-probe.c +0 -52

58 lines not on this page · raw message

drivers/ide/ide-sysfs.c new file +125 -0

125 lines not on this page · raw message

drivers/ide/ide.c +2 -70

83 lines not on this page · raw message

include/linux/ide.h +4 -0
Index: b/include/linux/ide.h
===================================================================
@@ -1517,6 +1517,7 @@ void ide_unregister_region(struct gendis
 void ide_undecoded_slave(ide_drive_t *);
 
 void ide_port_apply_params(ide_hwif_t *);
+int ide_sysfs_register_port(ide_hwif_t *);
 
 struct ide_host *ide_host_alloc(const struct ide_port_info *, hw_regs_t **);
 void ide_host_free(struct ide_host *);
@@ -1611,6 +1612,9 @@ extern struct mutex ide_cfg_mtx;
 
 #define local_irq_set(flags)	do { local_save_flags((flags)); local_irq_enable_in_hardirq(); } while (0)
 
+char *ide_media_string(ide_drive_t *);
+
+extern struct device_attribute ide_dev_attrs[];
 extern struct bus_type ide_bus_type;
 extern struct class *ide_port_class;