diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 0363d73b0be04b4f2a5186fc3c5da26ed9be30c3..e73016cbd40671eaac568a2e388106a7d67b08f9 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -206,7 +206,7 @@ static int set_xfer_rate (ide_drive_t *drive, int arg) ide_devset_rw(current_speed, xfer_rate); ide_devset_rw_field(init_speed, init_speed); ide_devset_rw_flag(nice1, IDE_DFLAG_NICE1); -ide_devset_rw_field(number, dn); +ide_devset_ro_field(number, dn); static const struct ide_proc_devset ide_generic_settings[] = { IDE_PROC_DEVSET(current_speed, 0, 70), diff --git a/include/linux/ide.h b/include/linux/ide.h index 46b771d6999ec1b78de78a037a46420c7ae88bfd..25046ffa5a4a6014b01ca38411532889adc43bf4 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -943,6 +943,10 @@ ide_devset_get(_name, _field); \ ide_devset_set(_name, _field); \ IDE_DEVSET(_name, DS_SYNC, get_##_name, set_##_name) +#define ide_devset_ro_field(_name, _field) \ +ide_devset_get(_name, _field); \ +IDE_DEVSET(_name, 0, get_##_name, NULL) + #define ide_devset_rw_flag(_name, _field) \ ide_devset_get_flag(_name, _field); \ ide_devset_set_flag(_name, _field); \