debugfs_remove(hsotg->debug_root);
}
+/**
+ * s3c_hsotg_release - release callback for hsotg device
+ * @dev: Device to for which release is called
+ */
+static void s3c_hsotg_release(struct device *dev)
+{
+ struct s3c_hsotg *hsotg = dev_get_drvdata(dev);
+
+ kfree(hsotg);
+}
+
/**
* s3c_hsotg_probe - probe function for hsotg driver
* @pdev: The platform information for the driver
*/
+
static int __devinit s3c_hsotg_probe(struct platform_device *pdev)
{
struct s3c_hsotg_plat *plat = pdev->dev.platform_data;
hsotg->gadget.dev.parent = dev;
hsotg->gadget.dev.dma_mask = dev->dma_mask;
+ hsotg->gadget.dev.release = s3c_hsotg_release;
/* reset the system */
clk_put(hsotg->clk);
device_unregister(&hsotg->gadget.dev);
- kfree(hsotg);
return 0;
}