[patch 2.6.20-git] at91_cf, fix build breakage and shrink codespace

David Brownell david-b at pacbell.net
Thu Feb 15 21:56:38 EST 2007


This is a minor correctness fix:  since the at91_cf driver probe() routine
is in the init section, it should use platform_driver_probe() instead of
leaving that pointer around in the driver struct after init section removal.

It also includes a major build breakage fix, which I'm guessing came from
incomplete code updates after removing "class_device" from this framework.

Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>

Index: at91/drivers/pcmcia/at91_cf.c
===================================================================
--- at91.orig/drivers/pcmcia/at91_cf.c	2007-02-15 18:20:53.000000000 -0800
+++ at91/drivers/pcmcia/at91_cf.c	2007-02-15 18:31:27.000000000 -0800
@@ -277,7 +277,7 @@ static int __init at91_cf_probe(struct p
 		board->det_pin, board->irq_pin);
 
 	cf->socket.owner = THIS_MODULE;
-	cf->socket.dev.dev = &pdev->dev;
+	cf->socket.dev.parent = &pdev->dev;
 	cf->socket.ops = &at91_cf_ops;
 	cf->socket.resource_ops = &pccard_static_ops;
 	cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
@@ -360,7 +360,6 @@ static struct platform_driver at91_cf_dr
 		.name		= (char *) driver_name,
 		.owner		= THIS_MODULE,
 	},
-	.probe		= at91_cf_probe,
 	.remove		= __exit_p(at91_cf_remove),
 	.suspend	= at91_cf_suspend,
 	.resume		= at91_cf_resume,
@@ -370,7 +369,7 @@ static struct platform_driver at91_cf_dr
 
 static int __init at91_cf_init(void)
 {
-	return platform_driver_register(&at91_cf_driver);
+	return platform_driver_probe(&at91_cf_driver, at91_cf_probe);
 }
 module_init(at91_cf_init);
 



More information about the linux-pcmcia mailing list