pr_debug("%s: %d bytes transferred: %d\n",
mmc_hostname(host),
mrq->data->bytes_xfered, mrq->data->error);
+#ifdef CONFIG_BLOCK
if (mrq->lat_hist_enabled) {
ktime_t completion;
u_int64_t delta_us;
(mrq->data->flags & MMC_DATA_READ),
delta_us);
}
+#endif
trace_mmc_blk_rw_end(cmd->opcode, cmd->arg, mrq->data);
}
}
if (!err && areq) {
+#ifdef CONFIG_BLOCK
if (host->latency_hist_enabled) {
areq->mrq->io_start = ktime_get();
areq->mrq->lat_hist_enabled = 1;
} else
areq->mrq->lat_hist_enabled = 0;
+#endif
trace_mmc_blk_rw_start(areq->mrq->cmd->opcode,
areq->mrq->cmd->arg,
areq->mrq->data);
destroy_workqueue(workqueue);
}
+#ifdef CONFIG_BLOCK
static ssize_t
latency_hist_show(struct device *dev, struct device_attribute *attr, char *buf)
{
{
device_remove_file(&host->class_dev, &dev_attr_latency_hist);
}
+#endif
subsys_initcall(mmc_init);
module_exit(mmc_exit);
mmc_add_host_debugfs(host);
#endif
+#ifdef CONFIG_BLOCK
mmc_latency_hist_sysfs_init(host);
+#endif
mmc_start_host(host);
if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
mmc_remove_host_debugfs(host);
#endif
+#ifdef CONFIG_BLOCK
mmc_latency_hist_sysfs_exit(host);
+#endif
device_del(&host->class_dev);