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

Commit 4ebb24f7 authored by Grant Likely's avatar Grant Likely
Browse files

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



Get rid of old users of of_platform_driver in arch/sparc.  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 00006124
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ static inline unsigned int get_dma_residue(unsigned int dmanr)
	return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info);
}

static int __devinit ecpp_probe(struct platform_device *op, const struct of_device_id *match)
static int __devinit ecpp_probe(struct platform_device *op)
{
	unsigned long base = op->resource[0].start;
	unsigned long config = op->resource[1].start;
@@ -235,7 +235,7 @@ static const struct of_device_id ecpp_match[] = {
	{},
};

static struct of_platform_driver ecpp_driver = {
static struct platform_driver ecpp_driver = {
	.driver = {
		.name = "ecpp",
		.owner = THIS_MODULE,
@@ -247,7 +247,7 @@ static struct of_platform_driver ecpp_driver = {

static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
{
	return of_register_platform_driver(&ecpp_driver);
	return platform_driver_register(&ecpp_driver);
}

#endif /* !(_ASM_SPARC64_PARPORT_H */
+3 −4
Original line number Diff line number Diff line
@@ -137,8 +137,7 @@ static const struct file_operations apc_fops = {

static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };

static int __devinit apc_probe(struct platform_device *op,
			       const struct of_device_id *match)
static int __devinit apc_probe(struct platform_device *op)
{
	int err;

@@ -174,7 +173,7 @@ static struct of_device_id __initdata apc_match[] = {
};
MODULE_DEVICE_TABLE(of, apc_match);

static struct of_platform_driver apc_driver = {
static struct platform_driver apc_driver = {
	.driver = {
		.name = "apc",
		.owner = THIS_MODULE,
@@ -185,7 +184,7 @@ static struct of_platform_driver apc_driver = {

static int __init apc_init(void)
{
	return of_register_platform_driver(&apc_driver);
	return platform_driver_register(&apc_driver);
}

/* This driver is not critical to the boot process
+3 −4
Original line number Diff line number Diff line
@@ -102,8 +102,7 @@ static struct of_device_id __initdata auxio_match[] = {

MODULE_DEVICE_TABLE(of, auxio_match);

static int __devinit auxio_probe(struct platform_device *dev,
				 const struct of_device_id *match)
static int __devinit auxio_probe(struct platform_device *dev)
{
	struct device_node *dp = dev->dev.of_node;
	unsigned long size;
@@ -132,7 +131,7 @@ static int __devinit auxio_probe(struct platform_device *dev,
	return 0;
}

static struct of_platform_driver auxio_driver = {
static struct platform_driver auxio_driver = {
	.probe		= auxio_probe,
	.driver = {
		.name = "auxio",
@@ -143,7 +142,7 @@ static struct of_platform_driver auxio_driver = {

static int __init auxio_init(void)
{
	return of_register_platform_driver(&auxio_driver);
	return platform_driver_register(&auxio_driver);
}

/* Must be after subsys_initcall() so that busses are probed.  Must
+6 −8
Original line number Diff line number Diff line
@@ -59,8 +59,7 @@ static int __devinit clock_board_calc_nslots(struct clock_board *p)
	}
}

static int __devinit clock_board_probe(struct platform_device *op,
				       const struct of_device_id *match)
static int __devinit clock_board_probe(struct platform_device *op)
{
	struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL);
	int err = -ENOMEM;
@@ -148,7 +147,7 @@ static struct of_device_id __initdata clock_board_match[] = {
	{},
};

static struct of_platform_driver clock_board_driver = {
static struct platform_driver clock_board_driver = {
	.probe		= clock_board_probe,
	.driver = {
		.name = "clock_board",
@@ -157,8 +156,7 @@ static struct of_platform_driver clock_board_driver = {
	},
};

static int __devinit fhc_probe(struct platform_device *op,
			       const struct of_device_id *match)
static int __devinit fhc_probe(struct platform_device *op)
{
	struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL);
	int err = -ENOMEM;
@@ -254,7 +252,7 @@ static struct of_device_id __initdata fhc_match[] = {
	{},
};

static struct of_platform_driver fhc_driver = {
static struct platform_driver fhc_driver = {
	.probe		= fhc_probe,
	.driver = {
		.name = "fhc",
@@ -265,8 +263,8 @@ static struct of_platform_driver fhc_driver = {

static int __init sunfire_init(void)
{
	(void) of_register_platform_driver(&fhc_driver);
	(void) of_register_platform_driver(&clock_board_driver);
	(void) platform_driver_register(&fhc_driver);
	(void) platform_driver_register(&clock_board_driver);
	return 0;
}

+8 −11
Original line number Diff line number Diff line
@@ -392,8 +392,7 @@ static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p,
	}
}

static int __devinit jbusmc_probe(struct platform_device *op,
				  const struct of_device_id *match)
static int __devinit jbusmc_probe(struct platform_device *op)
{
	const struct linux_prom64_registers *mem_regs;
	struct device_node *mem_node;
@@ -690,8 +689,7 @@ static void chmc_fetch_decode_regs(struct chmc *p)
				      chmc_read_mcreg(p, CHMCTRL_DECODE4));
}

static int __devinit chmc_probe(struct platform_device *op,
				const struct of_device_id *match)
static int __devinit chmc_probe(struct platform_device *op)
{
	struct device_node *dp = op->dev.of_node;
	unsigned long ver;
@@ -765,13 +763,12 @@ out_free:
	goto out;
}

static int __devinit us3mc_probe(struct platform_device *op,
				const struct of_device_id *match)
static int __devinit us3mc_probe(struct platform_device *op)
{
	if (mc_type == MC_TYPE_SAFARI)
		return chmc_probe(op, match);
		return chmc_probe(op);
	else if (mc_type == MC_TYPE_JBUS)
		return jbusmc_probe(op, match);
		return jbusmc_probe(op);
	return -ENODEV;
}

@@ -810,7 +807,7 @@ static const struct of_device_id us3mc_match[] = {
};
MODULE_DEVICE_TABLE(of, us3mc_match);

static struct of_platform_driver us3mc_driver = {
static struct platform_driver us3mc_driver = {
	.driver = {
		.name = "us3mc",
		.owner = THIS_MODULE,
@@ -848,7 +845,7 @@ static int __init us3mc_init(void)
	ret = register_dimm_printer(us3mc_dimm_printer);

	if (!ret) {
		ret = of_register_platform_driver(&us3mc_driver);
		ret = platform_driver_register(&us3mc_driver);
		if (ret)
			unregister_dimm_printer(us3mc_dimm_printer);
	}
@@ -859,7 +856,7 @@ static void __exit us3mc_cleanup(void)
{
	if (us3mc_platform()) {
		unregister_dimm_printer(us3mc_dimm_printer);
		of_unregister_platform_driver(&us3mc_driver);
		platform_driver_unregister(&us3mc_driver);
	}
}

Loading