Skip to content

Commit

Permalink
[PATCH] amiga_floppy_init() in non-modular case
Browse files Browse the repository at this point in the history
It used to be called directly, but that got lost in 2.1.87-pre1.
Similar breakage in ataflop got fixed 3 years ago, this one
had gone unnoticed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Al Viro authored and Linus Torvalds committed Oct 11, 2006
1 parent 2e81148 commit 2db5f59
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions drivers/block/amiflop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,10 +1709,13 @@ static struct kobject *floppy_find(dev_t dev, int *part, void *data)
return get_disk(unit[drive].gendisk);
}

int __init amiga_floppy_init(void)
static int __init amiga_floppy_init(void)
{
int i, ret;

if (!MACH_IS_AMIGA)
return -ENXIO;

if (!AMIGAHW_PRESENT(AMI_FLOPPY))
return -ENXIO;

Expand Down Expand Up @@ -1809,15 +1812,9 @@ int __init amiga_floppy_init(void)
return ret;
}

module_init(amiga_floppy_init);
#ifdef MODULE

int init_module(void)
{
if (!MACH_IS_AMIGA)
return -ENXIO;
return amiga_floppy_init();
}

#if 0 /* not safe to unload */
void cleanup_module(void)
{
Expand Down

0 comments on commit 2db5f59

Please sign in to comment.