Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147091
b: refs/heads/master
c: 5e50b9e
h: refs/heads/master
i:
  147089: 05a63bf
  147087: ba1c1a0
v: v3
  • Loading branch information
Ondrej Zary authored and Jens Axboe committed Jun 10, 2009
1 parent a0edbc5 commit d109a9c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1adbee50fd6fce5af4feb34d2db93cfe4d2066a4
refs/heads/master: 5e50b9ef975219304cc91d601530994861585bfe
27 changes: 26 additions & 1 deletion trunk/drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -4148,6 +4148,24 @@ static void floppy_device_release(struct device *dev)
{
}

static int floppy_resume(struct platform_device *dev)
{
int fdc;

for (fdc = 0; fdc < N_FDC; fdc++)
if (FDCS->address != -1)
user_reset_fdc(-1, FD_RESET_ALWAYS, 0);

return 0;
}

static struct platform_driver floppy_driver = {
.resume = floppy_resume,
.driver = {
.name = "floppy",
},
};

static struct platform_device floppy_device[N_DRIVE];

static struct kobject *floppy_find(dev_t dev, int *part, void *data)
Expand Down Expand Up @@ -4196,10 +4214,14 @@ static int __init floppy_init(void)
if (err)
goto out_put_disk;

err = platform_driver_register(&floppy_driver);
if (err)
goto out_unreg_blkdev;

floppy_queue = blk_init_queue(do_fd_request, &floppy_lock);
if (!floppy_queue) {
err = -ENOMEM;
goto out_unreg_blkdev;
goto out_unreg_driver;
}
blk_queue_max_sectors(floppy_queue, 64);

Expand Down Expand Up @@ -4346,6 +4368,8 @@ static int __init floppy_init(void)
out_unreg_region:
blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
blk_cleanup_queue(floppy_queue);
out_unreg_driver:
platform_driver_unregister(&floppy_driver);
out_unreg_blkdev:
unregister_blkdev(FLOPPY_MAJOR, "fd");
out_put_disk:
Expand Down Expand Up @@ -4566,6 +4590,7 @@ static void __exit floppy_module_exit(void)

blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
unregister_blkdev(FLOPPY_MAJOR, "fd");
platform_driver_unregister(&floppy_driver);

for (drive = 0; drive < N_DRIVE; drive++) {
del_timer_sync(&motor_off_timer[drive]);
Expand Down

0 comments on commit d109a9c

Please sign in to comment.