static void __devexit ace_free(struct device *dev) { struct ace_device *ace = dev_get_drvdata(dev); dev_dbg(dev, "ace_free(%p)\n", dev); if (ace) { ace_teardown(ace); dev_set_drvdata(dev, NULL); kfree(ace); } }
/* * Platform bus remove() method */ static int __devexit ace_remove(struct device *device) { struct ace_device *ace = dev_get_drvdata(device); dev_dbg(device, "ace_remove(%p)\n", device); if (ace) { ace_teardown(ace); kfree(ace); } return 0; }