aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index fbcf4b3f8d0e..326ef1b4a4ea 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3427,6 +3427,7 @@ static void cdrom_update_settings(void)
3427{ 3427{
3428 struct cdrom_device_info *cdi; 3428 struct cdrom_device_info *cdi;
3429 3429
3430 mutex_lock(&cdrom_mutex);
3430 for (cdi = topCdromPtr; cdi != NULL; cdi = cdi->next) { 3431 for (cdi = topCdromPtr; cdi != NULL; cdi = cdi->next) {
3431 if (autoclose && CDROM_CAN(CDC_CLOSE_TRAY)) 3432 if (autoclose && CDROM_CAN(CDC_CLOSE_TRAY))
3432 cdi->options |= CDO_AUTO_CLOSE; 3433 cdi->options |= CDO_AUTO_CLOSE;
@@ -3445,6 +3446,7 @@ static void cdrom_update_settings(void)
3445 else 3446 else
3446 cdi->options &= ~CDO_CHECK_TYPE; 3447 cdi->options &= ~CDO_CHECK_TYPE;
3447 } 3448 }
3449 mutex_unlock(&cdrom_mutex);
3448} 3450}
3449 3451
3450static int cdrom_sysctl_handler(ctl_table *ctl, int write, struct file * filp, 3452static int cdrom_sysctl_handler(ctl_table *ctl, int write, struct file * filp,