static int lm_bus_probe(struct device *dev) { struct lm_device *lmdev = to_lm_device(dev); struct lm_driver *lmdrv = to_lm_driver(dev->driver); return lmdrv->probe(lmdev); }
/** * of_find_device_by_node - Find the lm_device associated with a node * @np: Pointer to device tree node * * Returns platform_device pointer, or NULL if not found */ struct platform_device *of_find_lm_device_by_node(struct device_node *np) { struct device *dev; dev = bus_find_device(&lm_bustype, NULL, np, of_dev_node_match); return dev ? to_lm_device(dev) : NULL; }
static int lm_bus_remove(struct device *dev) { struct lm_device *lmdev = to_lm_device(dev); struct lm_driver *lmdrv = to_lm_driver(dev->driver); lmdrv->remove(lmdev); return 0; }
static int lm_bus_probe(struct device *dev) { struct lm_device *lmdev = to_lm_device(dev); struct lm_driver *lmdrv = to_lm_driver(dev->driver); printk (KERN_INFO "calling otg driver probe\n"); return lmdrv->probe(lmdev); }
static int lm_bus_suspend(struct device *dev, pm_message_t state) { struct lm_device *lmdev = to_lm_device(dev); struct lm_driver *lmdrv = to_lm_driver(dev->driver); if (lmdrv->suspend) return lmdrv->suspend(lmdev, state); return 0; }
static void lm_device_release(struct device *dev) { struct lm_device *d = to_lm_device(dev); kfree(d); }