diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:13 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-17 12:09:13 -0400 |
commit | 79cb380397c834a35952d8497651d93b543ef968 (patch) | |
tree | cfeb4b1c69327df9f8885d18fa0d0ef3e547cce4 /drivers/ide/ide-gd.c | |
parent | 9a6eb74d07f9152dd0e0ea551e878e869b8d2fc1 (diff) |
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 <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-gd.c')
-rw-r--r-- | drivers/ide/ide-gd.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index c08500270b9d..a3d4ad7db2af 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -119,6 +119,18 @@ static void ide_gd_shutdown(ide_drive_t *drive) | |||
119 | drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND); | 119 | drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND); |
120 | } | 120 | } |
121 | 121 | ||
122 | #ifdef CONFIG_IDE_PROC_FS | ||
123 | static ide_proc_entry_t *ide_disk_proc_entries(ide_drive_t *drive) | ||
124 | { | ||
125 | return ide_disk_proc; | ||
126 | } | ||
127 | |||
128 | static const struct ide_proc_devset *ide_disk_proc_devsets(ide_drive_t *drive) | ||
129 | { | ||
130 | return ide_disk_settings; | ||
131 | } | ||
132 | #endif | ||
133 | |||
122 | static ide_driver_t ide_gd_driver = { | 134 | static ide_driver_t ide_gd_driver = { |
123 | .gen_driver = { | 135 | .gen_driver = { |
124 | .owner = THIS_MODULE, | 136 | .owner = THIS_MODULE, |
@@ -134,8 +146,8 @@ static ide_driver_t ide_gd_driver = { | |||
134 | .end_request = ide_end_request, | 146 | .end_request = ide_end_request, |
135 | .error = __ide_error, | 147 | .error = __ide_error, |
136 | #ifdef CONFIG_IDE_PROC_FS | 148 | #ifdef CONFIG_IDE_PROC_FS |
137 | .proc = ide_disk_proc, | 149 | .proc_entries = ide_disk_proc_entries, |
138 | .settings = ide_disk_settings, | 150 | .proc_devsets = ide_disk_proc_devsets, |
139 | #endif | 151 | #endif |
140 | }; | 152 | }; |
141 | 153 | ||