Re: [PATCH] ide: falconide: convert to platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

On Tue, Nov 5, 2019 at 7:38 AM Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
> With the introduction of a platform device for the Atari Falcon IDE
> interface, the old Falcon IDE driver no longer loads (resource already
> claimed by the platform device).
>
> Convert falconide driver to use the same platform device that is used
> by pata_falcon also.
>
> Tested (as built-in driver) on my Atari Falcon.
>
> Signed-off-by: Michael Schmitz <schmitzmic@xxxxxxxxx>
> CC: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

Thanks for your patch!

> --- a/drivers/ide/falconide.c
> +++ b/drivers/ide/falconide.c
> @@ -15,6 +15,7 @@
>  #include <linux/blkdev.h>
>  #include <linux/ide.h>
>  #include <linux/init.h>
> +#include <linux/platform_device.h>
>
>  #include <asm/setup.h>
>  #include <asm/atarihw.h>
> @@ -23,6 +24,7 @@
>  #include <asm/ide.h>
>
>  #define DRV_NAME "falconide"
> +#define DRV_VERSION "0.1.0"

Does anyone care about that version?
Will it ever be updated?

> @@ -169,10 +177,21 @@ static int __init falconide_init(void)
>  err_free:
>         ide_host_free(host);
>  err:
> -       release_mem_region(ATA_HD_BASE, 0x40);
> +       release_mem_region(res->start, resource_size(res));
>         return rc;
>  }
>
> -module_init(falconide_init);
> +static struct platform_driver ide_falcon_driver = {
> +       .driver   = {
> +               .name   = "atari-falcon-ide",
> +       },
> +};

Missing .remove() callback.

> +
> +module_platform_driver_probe(ide_falcon_driver, falconide_init);
> +
>
> +MODULE_AUTHOR("Geert Uytterhoeven");
> +MODULE_DESCRIPTION("low-level driver for Atari Falcon IDE");
>  MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:atari-falcon-ide");
> +MODULE_VERSION(DRV_VERSION);

I'd drop the MODULE_VERSION().

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux