static int mmc_bus_resume(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = dev_to_mmc_card(dev); int ret = 0; if (dev->driver && drv->resume) ret = drv->resume(card); return ret; }
static int mmc_bus_suspend(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); int ret = 0; if (dev->driver && drv->suspend) ret = drv->suspend(card); return ret; }
static int mmc_bus_suspend(struct device *dev, pm_message_t state) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = dev_to_mmc_card(dev); int ret = 0; if (dev->driver && drv->suspend) ret = drv->suspend(card, state); return ret; }
static int mmc_bus_pm_suspend(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); int ret = 0; pm_message_t state = { PM_EVENT_SUSPEND }; if (dev->driver && drv->suspend) ret = drv->suspend(card, state); return ret; }
static int mmc_bus_remove(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); DBG("[%s] s\n",__func__); drv->remove(card); DBG("[%s] e\n",__func__); return 0; }
static int mmc_bus_pm_resume(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); int ret = 0; DBG("[%s] s\n",__func__); if (dev->driver && drv->resume) ret = drv->resume(card); DBG("[%s] e\n",__func__); return ret; }
static int mmc_bus_probe(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); /* * inform the assd module about the insertion of a new card. * but only if the assd module is loaded. */ if (assd_drv != NULL) assd_drv->probe(card); return drv->probe(card); }
static int mmc_bus_suspend(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); struct mmc_host *host = card->host; int ret; if (dev->driver && drv->suspend) { ret = drv->suspend(card); if (ret) return ret; } ret = host->bus_ops->suspend(host); return ret; }
static int mmc_bus_remove(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); /* * inform the assd module about the removal of a card. * but only if the assd module is loaded. */ if (assd_drv != NULL) assd_drv->remove(card); drv->remove(card); return 0; }
static int mmc_bus_resume(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); struct mmc_host *host = card->host; int ret; ret = host->bus_ops->resume(host); if (ret) pr_warn("%s: error %d during resume (card was removed?)\n", mmc_hostname(host), ret); if (dev->driver && drv->resume) ret = drv->resume(card); return ret; }
static void mmc_bus_shutdown(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); struct mmc_host *host = card->host; int ret; if (dev->driver && drv->shutdown) drv->shutdown(card); if (host->bus_ops->shutdown) { ret = host->bus_ops->shutdown(host); if (ret) pr_warn("%s: error %d during shutdown\n", mmc_hostname(host), ret); } }
static void mmc_bus_shutdown(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); if (!drv) { pr_debug("%s: %s: drv is NULL\n", dev_name(dev), __func__); return; } if (!card) { pr_debug("%s: %s: card is NULL\n", dev_name(dev), __func__); return; } if (drv->shutdown) drv->shutdown(card); }
static int mmc_bus_shutdown(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); struct mmc_host *host = card->host; int ret; if (dev->driver && drv->shutdown) ret = drv->shutdown(card); if (host->bus_ops->shutdown) { ret = host->bus_ops->shutdown(host); if (ret) { pr_err("%s: error during shutdown,ret = %d\n", mmc_hostname(host),ret); } } return 0; }
static void mmc_bus_shutdown(struct device *dev) { struct mmc_driver *drv = to_mmc_driver(dev->driver); struct mmc_card *card = mmc_dev_to_card(dev); drv->shutdown(card); }