提交 405ae7d3 编写于 作者: R Robert P. J. Day 提交者: Adrian Bunk

Replace remaining references to "driverfs" with "sysfs".

Globally, s/driverfs/sysfs/g.
Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
上级 ca820181
/* /*
* arch/i386/kernel/topology.c - Populate driverfs with topology information * arch/i386/kernel/topology.c - Populate sysfs with topology information
* *
* Written by: Matthew Dobson, IBM Corporation * Written by: Matthew Dobson, IBM Corporation
* Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL
......
...@@ -63,7 +63,7 @@ static struct sys_device device_oprofile = { ...@@ -63,7 +63,7 @@ static struct sys_device device_oprofile = {
}; };
static int __init init_driverfs(void) static int __init init_sysfs(void)
{ {
int error; int error;
if (!(error = sysdev_class_register(&oprofile_sysclass))) if (!(error = sysdev_class_register(&oprofile_sysclass)))
...@@ -72,15 +72,15 @@ static int __init init_driverfs(void) ...@@ -72,15 +72,15 @@ static int __init init_driverfs(void)
} }
static void exit_driverfs(void) static void exit_sysfs(void)
{ {
sysdev_unregister(&device_oprofile); sysdev_unregister(&device_oprofile);
sysdev_class_unregister(&oprofile_sysclass); sysdev_class_unregister(&oprofile_sysclass);
} }
#else #else
#define init_driverfs() do { } while (0) #define init_sysfs() do { } while (0)
#define exit_driverfs() do { } while (0) #define exit_sysfs() do { } while (0)
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
static int profile_exceptions_notify(struct notifier_block *self, static int profile_exceptions_notify(struct notifier_block *self,
...@@ -385,7 +385,7 @@ static int __init ppro_init(char ** cpu_type) ...@@ -385,7 +385,7 @@ static int __init ppro_init(char ** cpu_type)
return 1; return 1;
} }
/* in order to get driverfs right */ /* in order to get sysfs right */
static int using_nmi; static int using_nmi;
int __init op_nmi_init(struct oprofile_operations *ops) int __init op_nmi_init(struct oprofile_operations *ops)
...@@ -440,7 +440,7 @@ int __init op_nmi_init(struct oprofile_operations *ops) ...@@ -440,7 +440,7 @@ int __init op_nmi_init(struct oprofile_operations *ops)
return -ENODEV; return -ENODEV;
} }
init_driverfs(); init_sysfs();
using_nmi = 1; using_nmi = 1;
ops->create_files = nmi_create_files; ops->create_files = nmi_create_files;
ops->setup = nmi_setup; ops->setup = nmi_setup;
...@@ -456,5 +456,5 @@ int __init op_nmi_init(struct oprofile_operations *ops) ...@@ -456,5 +456,5 @@ int __init op_nmi_init(struct oprofile_operations *ops)
void op_nmi_exit(void) void op_nmi_exit(void)
{ {
if (using_nmi) if (using_nmi)
exit_driverfs(); exit_sysfs();
} }
/* /*
* arch/parisc/kernel/topology.c - Populate driverfs with topology information * arch/parisc/kernel/topology.c - Populate sysfs with topology information
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
......
...@@ -418,7 +418,7 @@ static struct sysdev_class timer_sysclass = { ...@@ -418,7 +418,7 @@ static struct sysdev_class timer_sysclass = {
set_kset_name("timer"), set_kset_name("timer"),
}; };
/* XXX this driverfs stuff should probably go elsewhere later -john */ /* XXX this sysfs stuff should probably go elsewhere later -john */
static struct sys_device device_timer = { static struct sys_device device_timer = {
.id = 0, .id = 0,
.cls = &timer_sysclass, .cls = &timer_sysclass,
......
...@@ -103,7 +103,7 @@ static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL); ...@@ -103,7 +103,7 @@ static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL);
#endif #endif
/* /*
* register_cpu - Setup a driverfs device for a CPU. * register_cpu - Setup a sysfs device for a CPU.
* @cpu - cpu->hotpluggable field set to 1 will generate a control file in * @cpu - cpu->hotpluggable field set to 1 will generate a control file in
* sysfs for this CPU. * sysfs for this CPU.
* @num - CPU number to use when creating the device. * @num - CPU number to use when creating the device.
......
...@@ -133,7 +133,7 @@ static SYSDEV_ATTR(distance, S_IRUGO, node_read_distance, NULL); ...@@ -133,7 +133,7 @@ static SYSDEV_ATTR(distance, S_IRUGO, node_read_distance, NULL);
/* /*
* register_node - Setup a driverfs device for a node. * register_node - Setup a sysfs device for a node.
* @num - Node number to use when creating the device. * @num - Node number to use when creating the device.
* *
* Initialize and register the node device. * Initialize and register the node device.
......
...@@ -494,7 +494,7 @@ static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_ ...@@ -494,7 +494,7 @@ static int __devinit ali1535_probe(struct pci_dev *dev, const struct pci_device_
return -ENODEV; return -ENODEV;
} }
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
ali1535_adapter.dev.parent = &dev->dev; ali1535_adapter.dev.parent = &dev->dev;
snprintf(ali1535_adapter.name, I2C_NAME_SIZE, snprintf(ali1535_adapter.name, I2C_NAME_SIZE,
......
...@@ -489,7 +489,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_ ...@@ -489,7 +489,7 @@ static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_
return -ENODEV; return -ENODEV;
} }
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
ali15x3_adapter.dev.parent = &dev->dev; ali15x3_adapter.dev.parent = &dev->dev;
snprintf(ali15x3_adapter.name, I2C_NAME_SIZE, snprintf(ali15x3_adapter.name, I2C_NAME_SIZE,
......
...@@ -374,7 +374,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev, ...@@ -374,7 +374,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev,
dev_dbg(&pdev->dev, "SMBREV = 0x%X\n", temp); dev_dbg(&pdev->dev, "SMBREV = 0x%X\n", temp);
dev_dbg(&pdev->dev, "AMD756_smba = 0x%X\n", amd756_ioport); dev_dbg(&pdev->dev, "AMD756_smba = 0x%X\n", amd756_ioport);
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
amd756_smbus.dev.parent = &pdev->dev; amd756_smbus.dev.parent = &pdev->dev;
sprintf(amd756_smbus.name, "SMBus %s adapter at %04x", sprintf(amd756_smbus.name, "SMBus %s adapter at %04x",
......
...@@ -371,7 +371,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev, ...@@ -371,7 +371,7 @@ static int __devinit amd8111_probe(struct pci_dev *dev,
smbus->adapter.algo = &smbus_algorithm; smbus->adapter.algo = &smbus_algorithm;
smbus->adapter.algo_data = smbus; smbus->adapter.algo_data = smbus;
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
smbus->adapter.dev.parent = &dev->dev; smbus->adapter.dev.parent = &dev->dev;
pci_write_config_dword(smbus->dev, AMD_PCI_MISC, 0); pci_write_config_dword(smbus->dev, AMD_PCI_MISC, 0);
......
...@@ -522,7 +522,7 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id ...@@ -522,7 +522,7 @@ static int __devinit i801_probe(struct pci_dev *dev, const struct pci_device_id
else else
dev_dbg(&dev->dev, "SMBus using PCI Interrupt\n"); dev_dbg(&dev->dev, "SMBus using PCI Interrupt\n");
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
i801_adapter.dev.parent = &dev->dev; i801_adapter.dev.parent = &dev->dev;
snprintf(i801_adapter.name, I2C_NAME_SIZE, snprintf(i801_adapter.name, I2C_NAME_SIZE,
......
...@@ -425,7 +425,7 @@ static int __devinit piix4_probe(struct pci_dev *dev, ...@@ -425,7 +425,7 @@ static int __devinit piix4_probe(struct pci_dev *dev,
if (retval) if (retval)
return retval; return retval;
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
piix4_adapter.dev.parent = &dev->dev; piix4_adapter.dev.parent = &dev->dev;
snprintf(piix4_adapter.name, I2C_NAME_SIZE, snprintf(piix4_adapter.name, I2C_NAME_SIZE,
......
...@@ -384,7 +384,7 @@ static int __devinit sis5595_probe(struct pci_dev *dev, const struct pci_device_ ...@@ -384,7 +384,7 @@ static int __devinit sis5595_probe(struct pci_dev *dev, const struct pci_device_
return -ENODEV; return -ENODEV;
} }
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
sis5595_adapter.dev.parent = &dev->dev; sis5595_adapter.dev.parent = &dev->dev;
sprintf(sis5595_adapter.name, "SMBus SIS5595 adapter at %04x", sprintf(sis5595_adapter.name, "SMBus SIS5595 adapter at %04x",
......
...@@ -477,7 +477,7 @@ static int __devinit sis630_probe(struct pci_dev *dev, const struct pci_device_i ...@@ -477,7 +477,7 @@ static int __devinit sis630_probe(struct pci_dev *dev, const struct pci_device_i
return -ENODEV; return -ENODEV;
} }
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
sis630_adapter.dev.parent = &dev->dev; sis630_adapter.dev.parent = &dev->dev;
sprintf(sis630_adapter.name, "SMBus SIS630 adapter at %04x", sprintf(sis630_adapter.name, "SMBus SIS630 adapter at %04x",
......
...@@ -297,7 +297,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev, ...@@ -297,7 +297,7 @@ static int __devinit sis96x_probe(struct pci_dev *dev,
return -EINVAL; return -EINVAL;
} }
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
sis96x_adapter.dev.parent = &dev->dev; sis96x_adapter.dev.parent = &dev->dev;
snprintf(sis96x_adapter.name, I2C_NAME_SIZE, snprintf(sis96x_adapter.name, I2C_NAME_SIZE,
......
...@@ -138,7 +138,7 @@ static int __devinit vt586b_probe(struct pci_dev *dev, const struct pci_device_i ...@@ -138,7 +138,7 @@ static int __devinit vt586b_probe(struct pci_dev *dev, const struct pci_device_i
outb(inb(I2C_DIR) & ~(I2C_SDA | I2C_SCL), I2C_DIR); outb(inb(I2C_DIR) & ~(I2C_SDA | I2C_SCL), I2C_DIR);
outb(inb(I2C_OUT) & ~(I2C_SDA | I2C_SCL), I2C_OUT); outb(inb(I2C_OUT) & ~(I2C_SDA | I2C_SCL), I2C_OUT);
/* set up the driverfs linkage to our parent device */ /* set up the sysfs linkage to our parent device */
vt586b_adapter.dev.parent = &dev->dev; vt586b_adapter.dev.parent = &dev->dev;
res = i2c_bit_add_bus(&vt586b_adapter); res = i2c_bit_add_bus(&vt586b_adapter);
......
...@@ -5574,14 +5574,14 @@ static ssize_t osst_version_show(struct device_driver *ddd, char *buf) ...@@ -5574,14 +5574,14 @@ static ssize_t osst_version_show(struct device_driver *ddd, char *buf)
static DRIVER_ATTR(version, S_IRUGO, osst_version_show, NULL); static DRIVER_ATTR(version, S_IRUGO, osst_version_show, NULL);
static int osst_create_driverfs_files(struct device_driver *driverfs) static int osst_create_sysfs_files(struct device_driver *sysfs)
{ {
return driver_create_file(driverfs, &driver_attr_version); return driver_create_file(sysfs, &driver_attr_version);
} }
static void osst_remove_driverfs_files(struct device_driver *driverfs) static void osst_remove_sysfs_files(struct device_driver *sysfs)
{ {
driver_remove_file(driverfs, &driver_attr_version); driver_remove_file(sysfs, &driver_attr_version);
} }
/* /*
...@@ -5953,7 +5953,7 @@ static int __init init_osst(void) ...@@ -5953,7 +5953,7 @@ static int __init init_osst(void)
if (err) if (err)
goto err_out_chrdev; goto err_out_chrdev;
err = osst_create_driverfs_files(&osst_template.gendrv); err = osst_create_sysfs_files(&osst_template.gendrv);
if (err) if (err)
goto err_out_scsidrv; goto err_out_scsidrv;
...@@ -5973,7 +5973,7 @@ static void __exit exit_osst (void) ...@@ -5973,7 +5973,7 @@ static void __exit exit_osst (void)
int i; int i;
struct osst_tape * STp; struct osst_tape * STp;
osst_remove_driverfs_files(&osst_template.gendrv); osst_remove_sysfs_files(&osst_template.gendrv);
scsi_unregister_driver(&osst_template.gendrv); scsi_unregister_driver(&osst_template.gendrv);
unregister_chrdev(OSST_MAJOR, "osst"); unregister_chrdev(OSST_MAJOR, "osst");
osst_sysfs_cleanup(); osst_sysfs_cleanup();
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#define SCSI_TIMEOUT (2*HZ) #define SCSI_TIMEOUT (2*HZ)
/* /*
* Prefix values for the SCSI id's (stored in driverfs name field) * Prefix values for the SCSI id's (stored in sysfs name field)
*/ */
#define SCSI_UID_SER_NUM 'S' #define SCSI_UID_SER_NUM 'S'
#define SCSI_UID_UNKNOWN 'Z' #define SCSI_UID_UNKNOWN 'Z'
......
...@@ -195,8 +195,8 @@ static int sgl_unmap_user_pages(struct scatterlist *, const unsigned int, int); ...@@ -195,8 +195,8 @@ static int sgl_unmap_user_pages(struct scatterlist *, const unsigned int, int);
static int st_probe(struct device *); static int st_probe(struct device *);
static int st_remove(struct device *); static int st_remove(struct device *);
static int do_create_driverfs_files(void); static int do_create_sysfs_files(void);
static void do_remove_driverfs_files(void); static void do_remove_sysfs_files(void);
static int do_create_class_files(struct scsi_tape *, int, int); static int do_create_class_files(struct scsi_tape *, int, int);
static struct scsi_driver st_template = { static struct scsi_driver st_template = {
...@@ -4193,7 +4193,7 @@ static int __init init_st(void) ...@@ -4193,7 +4193,7 @@ static int __init init_st(void)
if (err) if (err)
goto err_chrdev; goto err_chrdev;
err = do_create_driverfs_files(); err = do_create_sysfs_files();
if (err) if (err)
goto err_scsidrv; goto err_scsidrv;
...@@ -4211,7 +4211,7 @@ static int __init init_st(void) ...@@ -4211,7 +4211,7 @@ static int __init init_st(void)
static void __exit exit_st(void) static void __exit exit_st(void)
{ {
do_remove_driverfs_files(); do_remove_sysfs_files();
scsi_unregister_driver(&st_template.gendrv); scsi_unregister_driver(&st_template.gendrv);
unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0), unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
ST_MAX_TAPE_ENTRIES); ST_MAX_TAPE_ENTRIES);
...@@ -4249,43 +4249,43 @@ static ssize_t st_version_show(struct device_driver *ddd, char *buf) ...@@ -4249,43 +4249,43 @@ static ssize_t st_version_show(struct device_driver *ddd, char *buf)
} }
static DRIVER_ATTR(version, S_IRUGO, st_version_show, NULL); static DRIVER_ATTR(version, S_IRUGO, st_version_show, NULL);
static int do_create_driverfs_files(void) static int do_create_sysfs_files(void)
{ {
struct device_driver *driverfs = &st_template.gendrv; struct device_driver *sysfs = &st_template.gendrv;
int err; int err;
err = driver_create_file(driverfs, &driver_attr_try_direct_io); err = driver_create_file(sysfs, &driver_attr_try_direct_io);
if (err) if (err)
return err; return err;
err = driver_create_file(driverfs, &driver_attr_fixed_buffer_size); err = driver_create_file(sysfs, &driver_attr_fixed_buffer_size);
if (err) if (err)
goto err_try_direct_io; goto err_try_direct_io;
err = driver_create_file(driverfs, &driver_attr_max_sg_segs); err = driver_create_file(sysfs, &driver_attr_max_sg_segs);
if (err) if (err)
goto err_attr_fixed_buf; goto err_attr_fixed_buf;
err = driver_create_file(driverfs, &driver_attr_version); err = driver_create_file(sysfs, &driver_attr_version);
if (err) if (err)
goto err_attr_max_sg; goto err_attr_max_sg;
return 0; return 0;
err_attr_max_sg: err_attr_max_sg:
driver_remove_file(driverfs, &driver_attr_max_sg_segs); driver_remove_file(sysfs, &driver_attr_max_sg_segs);
err_attr_fixed_buf: err_attr_fixed_buf:
driver_remove_file(driverfs, &driver_attr_fixed_buffer_size); driver_remove_file(sysfs, &driver_attr_fixed_buffer_size);
err_try_direct_io: err_try_direct_io:
driver_remove_file(driverfs, &driver_attr_try_direct_io); driver_remove_file(sysfs, &driver_attr_try_direct_io);
return err; return err;
} }
static void do_remove_driverfs_files(void) static void do_remove_sysfs_files(void)
{ {
struct device_driver *driverfs = &st_template.gendrv; struct device_driver *sysfs = &st_template.gendrv;
driver_remove_file(driverfs, &driver_attr_version); driver_remove_file(sysfs, &driver_attr_version);
driver_remove_file(driverfs, &driver_attr_max_sg_segs); driver_remove_file(sysfs, &driver_attr_max_sg_segs);
driver_remove_file(driverfs, &driver_attr_fixed_buffer_size); driver_remove_file(sysfs, &driver_attr_fixed_buffer_size);
driver_remove_file(driverfs, &driver_attr_try_direct_io); driver_remove_file(sysfs, &driver_attr_try_direct_io);
} }
......
...@@ -322,7 +322,7 @@ static inline void remove_debug_files (struct ehci_hcd *bus) { } ...@@ -322,7 +322,7 @@ static inline void remove_debug_files (struct ehci_hcd *bus) { }
#else #else
/* troubleshooting help: expose state in driverfs */ /* troubleshooting help: expose state in sysfs */
#define speed_char(info1) ({ char tmp; \ #define speed_char(info1) ({ char tmp; \
switch (info1 & (3 << 12)) { \ switch (info1 & (3 << 12)) { \
......
...@@ -440,7 +440,7 @@ static ctl_table nlm_sysctl_root[] = { ...@@ -440,7 +440,7 @@ static ctl_table nlm_sysctl_root[] = {
}; };
/* /*
* Module (and driverfs) parameters. * Module (and sysfs) parameters.
*/ */
#define param_set_min_max(name, type, which_strtol, min, max) \ #define param_set_min_max(name, type, which_strtol, min, max) \
......
...@@ -101,7 +101,7 @@ extern int bus_unregister_notifier(struct bus_type *bus, ...@@ -101,7 +101,7 @@ extern int bus_unregister_notifier(struct bus_type *bus,
#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be
unbound */ unbound */
/* driverfs interface for exporting bus attributes */ /* sysfs interface for exporting bus attributes */
struct bus_attribute { struct bus_attribute {
struct attribute attr; struct attribute attr;
...@@ -146,7 +146,7 @@ extern void put_driver(struct device_driver * drv); ...@@ -146,7 +146,7 @@ extern void put_driver(struct device_driver * drv);
extern struct device_driver *driver_find(const char *name, struct bus_type *bus); extern struct device_driver *driver_find(const char *name, struct bus_type *bus);
extern int driver_probe_done(void); extern int driver_probe_done(void);
/* driverfs interface for exporting driver attributes */ /* sysfs interface for exporting driver attributes */
struct driver_attribute { struct driver_attribute {
struct attribute attr; struct attribute attr;
......
...@@ -59,7 +59,7 @@ struct kparam_array ...@@ -59,7 +59,7 @@ struct kparam_array
}; };
/* This is the fundamental function for registering boot/module /* This is the fundamental function for registering boot/module
parameters. perm sets the visibility in driverfs: 000 means it's parameters. perm sets the visibility in sysfs: 000 means it's
not there, read bits mean it's readable, write bits mean it's not there, read bits mean it's readable, write bits mean it's
writable. */ writable. */
#define __module_param_call(prefix, name, set, get, arg, perm) \ #define __module_param_call(prefix, name, set, get, arg, perm) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册