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

Commit f7ec9437 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: musb: pass platform_ops via platform_data



... then we don't need to export any symbols
from glue layer to musb_core.

Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a023c631
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -530,7 +530,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
	}
}

const struct musb_platform_ops musb_ops = {
static const struct musb_platform_ops am35x_ops = {
	.init		= am35x_musb_init,
	.exit		= am35x_musb_exit,

@@ -572,6 +572,8 @@ static int __init am35x_probe(struct platform_device *pdev)
	glue->dev			= &pdev->dev;
	glue->musb			= musb;

	pdata->platform_ops		= &am35x_ops;

	platform_set_drvdata(pdev, glue);

	ret = platform_device_add_resources(musb, pdev->resource,
+3 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ static int bfin_musb_exit(struct musb *musb)
	return 0;
}

const struct musb_platform_ops musb_ops = {
static const struct musb_platform_ops bfin_ops = {
	.init		= bfin_musb_init,
	.exit		= bfin_musb_exit,

@@ -479,6 +479,8 @@ static int __init bfin_probe(struct platform_device *pdev)
	glue->dev			= &pdev->dev;
	glue->musb			= musb;

	pdata->platform_ops		= &bfin_ops;

	platform_set_drvdata(pdev, glue);

	ret = platform_device_add_resources(musb, pdev->resource,
+3 −1
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ static int da8xx_musb_exit(struct musb *musb)
	return 0;
}

const struct musb_platform_ops musb_ops = {
static const struct musb_platform_ops da8xx_ops = {
	.init		= da8xx_musb_init,
	.exit		= da8xx_musb_exit,

@@ -517,6 +517,8 @@ static int __init da8xx_probe(struct platform_device *pdev)
	glue->dev			= &pdev->dev;
	glue->musb			= musb;

	pdata->platform_ops		= &da8xx_ops;

	platform_set_drvdata(pdev, glue);

	ret = platform_device_add_resources(musb, pdev->resource,
+3 −1
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ static int davinci_musb_exit(struct musb *musb)
	return 0;
}

const struct musb_platform_ops musb_ops = {
static const struct musb_platform_ops davinci_ops = {
	.init		= davinci_musb_init,
	.exit		= davinci_musb_exit,

@@ -551,6 +551,8 @@ static int __init davinci_probe(struct platform_device *pdev)
	glue->dev			= &pdev->dev;
	glue->musb			= musb;

	pdata->platform_ops		= &davinci_ops;

	platform_set_drvdata(pdev, glue);

	ret = platform_device_add_resources(musb, pdev->resource,
+1 −1
Original line number Diff line number Diff line
@@ -1897,7 +1897,6 @@ allocate_instance(struct device *dev,
	}

	musb->controller = dev;
	musb->ops = &musb_ops;

	return musb;
}
@@ -1997,6 +1996,7 @@ bad_config:
	musb->board_set_power = plat->set_power;
	musb->set_clock = plat->set_clock;
	musb->min_power = plat->min_power;
	musb->ops = plat->platform_ops;

	/* Clock usage is chip-specific ... functional clock (DaVinci,
	 * OMAP2430), or PHY ref (some TUSB6010 boards).  All this core
Loading