mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ide: allow device drivers to specify per-device type /proc settings
Turn ide_driver_t's 'proc' field into ->proc_entries method (and also 'settings' field into ->proc_devsets method). Then update all device drivers accordingly. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
9a6eb74d07
commit
79cb380397
7 changed files with 74 additions and 22 deletions
|
|
@ -343,6 +343,11 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r
|
|||
}
|
||||
|
||||
#ifdef CONFIG_IDE_PROC_FS
|
||||
static ide_proc_entry_t idescsi_proc[] = {
|
||||
{ "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL },
|
||||
{ NULL, 0, NULL, NULL }
|
||||
};
|
||||
|
||||
#define ide_scsi_devset_get(name, field) \
|
||||
static int get_##name(ide_drive_t *drive) \
|
||||
{ \
|
||||
|
|
@ -378,6 +383,16 @@ static const struct ide_proc_devset idescsi_settings[] = {
|
|||
IDE_PROC_DEVSET(transform, 0, 3),
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
static ide_proc_entry_t *ide_scsi_proc_entries(ide_drive_t *drive)
|
||||
{
|
||||
return idescsi_proc;
|
||||
}
|
||||
|
||||
static const struct ide_proc_devset *ide_scsi_proc_devsets(ide_drive_t *drive)
|
||||
{
|
||||
return idescsi_settings;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -419,13 +434,6 @@ static void ide_scsi_remove(ide_drive_t *drive)
|
|||
|
||||
static int ide_scsi_probe(ide_drive_t *);
|
||||
|
||||
#ifdef CONFIG_IDE_PROC_FS
|
||||
static ide_proc_entry_t idescsi_proc[] = {
|
||||
{ "capacity", S_IFREG|S_IRUGO, proc_ide_read_capacity, NULL },
|
||||
{ NULL, 0, NULL, NULL }
|
||||
};
|
||||
#endif
|
||||
|
||||
static ide_driver_t idescsi_driver = {
|
||||
.gen_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
|
|
@ -439,8 +447,8 @@ static ide_driver_t idescsi_driver = {
|
|||
.end_request = idescsi_end_request,
|
||||
.error = idescsi_atapi_error,
|
||||
#ifdef CONFIG_IDE_PROC_FS
|
||||
.proc = idescsi_proc,
|
||||
.settings = idescsi_settings,
|
||||
.proc_entries = ide_scsi_proc_entries,
|
||||
.proc_devsets = ide_scsi_proc_devsets,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue