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:31 PM Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
On Tue, Nov 5, 2019 at 9:11 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
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>

--- a/drivers/ide/falconide.c
+++ b/drivers/ide/falconide.c

@@ -23,6 +24,7 @@
 #include <asm/ide.h>

 #define DRV_NAME "falconide"
+#define DRV_VERSION "0.1.0"

Does anyone care about that version?

Not likely.

Will it ever be updated?

You ask me? You're still listed as driver author!

Yeah, I wrote a "it compiles, so it must work" driver in the IDE framework,
based on a driver in an even older framework. I never ran it on hardware ;-)

@@ -169,10 +177,21 @@ static int __init falconide_init(void)

Should I remove the __init here? Doesn't hurt in the built-in use
case, what about use as a module?

Should be fine.


 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.

Can't easily test driver remove, but I can certainly add a callback for that.

ide_unregister does the Right Thing (i.e. leaves the ST-DMA interrupt
registered) so no reason why it shouldn't work.

gayle.c uses ide_host_remove().

+
+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().

Done.

Shall I merge this one with part one of the old series so there's no
chance of a bisection going wrong?

Yes please.
Thanks!

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]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux