diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-12 18:40:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-12 18:40:30 -0500 |
commit | 55437989bd4725a8d3371924babe2cb7ea882bfb (patch) | |
tree | 1869d4f0c5abbc124717d1b5a313939e436f638f | |
parent | a7e8ddd813c20e3e10c9012f1625a5a02f870b15 (diff) | |
parent | ca957b6a34a6f7014828f235e35c1945cb955795 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE update from David Miller:
"Two small IDE layer adjustments"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
drivers: ide: Fix mostly harmless off-by-one hardcoded value
IDE: Deletion of an unnecessary check before the function call "module_put"
-rw-r--r-- | drivers/ide/ide-floppy.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 3d42043fec51..8c6363cdd208 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -487,7 +487,7 @@ static void ide_floppy_setup(ide_drive_t *drive) | |||
487 | * it. It should be fixed as of version 1.9, but to be on the safe side | 487 | * it. It should be fixed as of version 1.9, but to be on the safe side |
488 | * we'll leave the limitation below for the 2.2.x tree. | 488 | * we'll leave the limitation below for the 2.2.x tree. |
489 | */ | 489 | */ |
490 | if (!strncmp((char *)&id[ATA_ID_PROD], "IOMEGA ZIP 100 ATAPI", 20)) { | 490 | if (strstarts((char *)&id[ATA_ID_PROD], "IOMEGA ZIP 100 ATAPI")) { |
491 | drive->atapi_flags |= IDE_AFLAG_ZIP_DRIVE; | 491 | drive->atapi_flags |= IDE_AFLAG_ZIP_DRIVE; |
492 | /* This value will be visible in the /proc/ide/hdx/settings */ | 492 | /* This value will be visible in the /proc/ide/hdx/settings */ |
493 | drive->pc_delay = IDEFLOPPY_PC_DELAY; | 493 | drive->pc_delay = IDEFLOPPY_PC_DELAY; |
@@ -498,7 +498,7 @@ static void ide_floppy_setup(ide_drive_t *drive) | |||
498 | * Guess what? The IOMEGA Clik! drive also needs the above fix. It makes | 498 | * Guess what? The IOMEGA Clik! drive also needs the above fix. It makes |
499 | * nasty clicking noises without it, so please don't remove this. | 499 | * nasty clicking noises without it, so please don't remove this. |
500 | */ | 500 | */ |
501 | if (strncmp((char *)&id[ATA_ID_PROD], "IOMEGA Clik!", 11) == 0) { | 501 | if (strstarts((char *)&id[ATA_ID_PROD], "IOMEGA Clik!")) { |
502 | blk_queue_max_hw_sectors(drive->queue, 64); | 502 | blk_queue_max_hw_sectors(drive->queue, 64); |
503 | drive->atapi_flags |= IDE_AFLAG_CLIK_DRIVE; | 503 | drive->atapi_flags |= IDE_AFLAG_CLIK_DRIVE; |
504 | /* IOMEGA Clik! drives do not support lock/unlock commands */ | 504 | /* IOMEGA Clik! drives do not support lock/unlock commands */ |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 2ce6268a2734..e29b02ca9e91 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -101,8 +101,7 @@ void ide_device_put(ide_drive_t *drive) | |||
101 | struct device *host_dev = drive->hwif->host->dev[0]; | 101 | struct device *host_dev = drive->hwif->host->dev[0]; |
102 | struct module *module = host_dev ? host_dev->driver->owner : NULL; | 102 | struct module *module = host_dev ? host_dev->driver->owner : NULL; |
103 | 103 | ||
104 | if (module) | 104 | module_put(module); |
105 | module_put(module); | ||
106 | #endif | 105 | #endif |
107 | put_device(&drive->gendev); | 106 | put_device(&drive->gendev); |
108 | } | 107 | } |