예제 #1
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);

	return lmdrv->probe(lmdev);
}
예제 #2
0
/**
 * 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;
}
예제 #3
0
파일: lm.c 프로젝트: 12019/hg556a_source
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;
}
예제 #4
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);
}
예제 #5
0
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;
}
예제 #6
0
static void lm_device_release(struct device *dev)
{
	struct lm_device *d = to_lm_device(dev);

	kfree(d);
}