Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00006124 authored by Grant Likely's avatar Grant Likely
Browse files

dt/powerpc: Eliminate users of of_platform_{,un}register_driver



Get rid of old users of of_platform_driver in arch/powerpc.  Most
of_platform_driver users can be converted to use the platform_bus
directly.

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 710ac54b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -36,8 +36,7 @@
 * lacking some bits needed here.
 */

static int __devinit of_pci_phb_probe(struct platform_device *dev,
				      const struct of_device_id *match)
static int __devinit of_pci_phb_probe(struct platform_device *dev)
{
	struct pci_controller *phb;

@@ -104,7 +103,7 @@ static struct of_device_id of_pci_phb_ids[] = {
	{}
};

static struct of_platform_driver of_pci_phb_driver = {
static struct platform_driver of_pci_phb_driver = {
	.probe = of_pci_phb_probe,
	.driver = {
		.name = "of-pci",
@@ -115,7 +114,7 @@ static struct of_platform_driver of_pci_phb_driver = {

static __init int of_pci_phb_init(void)
{
	return of_register_platform_driver(&of_pci_phb_driver);
	return platform_driver_register(&of_pci_phb_driver);
}

device_initcall(of_pci_phb_init);
+6 −8
Original line number Diff line number Diff line
@@ -147,8 +147,7 @@ mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
	return 0;
}

static int __devinit mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev,
					const struct of_device_id *match)
static int __devinit mpc52xx_wkup_gpiochip_probe(struct platform_device *ofdev)
{
	struct mpc52xx_gpiochip *chip;
	struct mpc52xx_gpio_wkup __iomem *regs;
@@ -191,7 +190,7 @@ static const struct of_device_id mpc52xx_wkup_gpiochip_match[] = {
	{}
};

static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = {
static struct platform_driver mpc52xx_wkup_gpiochip_driver = {
	.driver = {
		.name = "gpio_wkup",
		.owner = THIS_MODULE,
@@ -310,8 +309,7 @@ mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
	return 0;
}

static int __devinit mpc52xx_simple_gpiochip_probe(struct platform_device *ofdev,
					const struct of_device_id *match)
static int __devinit mpc52xx_simple_gpiochip_probe(struct platform_device *ofdev)
{
	struct mpc52xx_gpiochip *chip;
	struct gpio_chip *gc;
@@ -349,7 +347,7 @@ static const struct of_device_id mpc52xx_simple_gpiochip_match[] = {
	{}
};

static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
static struct platform_driver mpc52xx_simple_gpiochip_driver = {
	.driver = {
		.name = "gpio",
		.owner = THIS_MODULE,
@@ -361,10 +359,10 @@ static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {

static int __init mpc52xx_gpio_init(void)
{
	if (of_register_platform_driver(&mpc52xx_wkup_gpiochip_driver))
	if (platform_driver_register(&mpc52xx_wkup_gpiochip_driver))
		printk(KERN_ERR "Unable to register wakeup GPIO driver\n");

	if (of_register_platform_driver(&mpc52xx_simple_gpiochip_driver))
	if (platform_driver_register(&mpc52xx_simple_gpiochip_driver))
		printk(KERN_ERR "Unable to register simple GPIO driver\n");

	return 0;
+3 −7
Original line number Diff line number Diff line
@@ -721,8 +721,7 @@ static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt,
/* ---------------------------------------------------------------------
 * of_platform bus binding code
 */
static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev,
				       const struct of_device_id *match)
static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev)
{
	struct mpc52xx_gpt_priv *gpt;

@@ -781,7 +780,7 @@ static const struct of_device_id mpc52xx_gpt_match[] = {
	{}
};

static struct of_platform_driver mpc52xx_gpt_driver = {
static struct platform_driver mpc52xx_gpt_driver = {
	.driver = {
		.name = "mpc52xx-gpt",
		.owner = THIS_MODULE,
@@ -793,10 +792,7 @@ static struct of_platform_driver mpc52xx_gpt_driver = {

static int __init mpc52xx_gpt_init(void)
{
	if (of_register_platform_driver(&mpc52xx_gpt_driver))
		pr_err("error registering MPC52xx GPT driver\n");

	return 0;
	return platform_driver_register(&mpc52xx_gpt_driver);
}

/* Make sure GPIOs and IRQs get set up before anyone tries to use them */
+4 −7
Original line number Diff line number Diff line
@@ -436,8 +436,7 @@ void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req)
}
EXPORT_SYMBOL(mpc52xx_lpbfifo_abort);

static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op,
					   const struct of_device_id *match)
static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op)
{
	struct resource res;
	int rc = -ENOMEM;
@@ -536,7 +535,7 @@ static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = {
	{},
};

static struct of_platform_driver mpc52xx_lpbfifo_driver = {
static struct platform_driver mpc52xx_lpbfifo_driver = {
	.driver = {
		.name = "mpc52xx-lpbfifo",
		.owner = THIS_MODULE,
@@ -551,14 +550,12 @@ static struct of_platform_driver mpc52xx_lpbfifo_driver = {
 */
static int __init mpc52xx_lpbfifo_init(void)
{
	pr_debug("Registering LocalPlus bus FIFO driver\n");
	return of_register_platform_driver(&mpc52xx_lpbfifo_driver);
	return platform_driver_register(&mpc52xx_lpbfifo_driver);
}
module_init(mpc52xx_lpbfifo_init);

static void __exit mpc52xx_lpbfifo_exit(void)
{
	pr_debug("Unregistering LocalPlus bus FIFO driver\n");
	of_unregister_platform_driver(&mpc52xx_lpbfifo_driver);
	platform_driver_unregister(&mpc52xx_lpbfifo_driver);
}
module_exit(mpc52xx_lpbfifo_exit);
+3 −4
Original line number Diff line number Diff line
@@ -111,8 +111,7 @@ static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
	.ops = &ep8248e_mdio_ops,
};

static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev,
                                        const struct of_device_id *match)
static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev)
{
	struct mii_bus *bus;
	struct resource res;
@@ -167,7 +166,7 @@ static const struct of_device_id ep8248e_mdio_match[] = {
	{},
};

static struct of_platform_driver ep8248e_mdio_driver = {
static struct platform_driver ep8248e_mdio_driver = {
	.driver = {
		.name = "ep8248e-mdio-bitbang",
		.owner = THIS_MODULE,
@@ -308,7 +307,7 @@ static __initdata struct of_device_id of_bus_ids[] = {
static int __init declare_of_platform_devices(void)
{
	of_platform_bus_probe(NULL, of_bus_ids, NULL);
	of_register_platform_driver(&ep8248e_mdio_driver);
	platform_driver_register(&ep8248e_mdio_driver);

	return 0;
}
Loading