unsigned int dma_channels;
};
+int bcm6348_iudma_drivers_register(struct platform_device *pdev);
+
static inline u32 dma_readl(struct bcm6348_iudma *iudma, u32 off)
{
u32 val;
platform_set_drvdata(pdev, iudma);
- return 0;
+ return bcm6348_iudma_drivers_register(pdev);
}
static const struct of_device_id bcm6348_iudma_of_match[] = {
.probe = bcm6348_emac_probe,
.remove = bcm6348_emac_remove,
};
-module_platform_driver(bcm6348_emac_driver);
+
+int bcm6348_iudma_drivers_register(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ int ret;
+
+ ret = platform_driver_register(&bcm6348_emac_driver);
+ if (ret)
+ dev_err(dev, "error registering emac driver!\n");
+
+ return ret;
+}