Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8a799eb authored by Mohan Srinivasan's avatar Mohan Srinivasan Committed by Amit Pundir
Browse files

Fix a build issue with CONFIG_MMC but !CONFIG_BLOCK.



Fixes a build issue with CONFIG_MMC enabled but CONFIG_BLOCK
disabled.

Change-Id: I5a3a1cb0462aa0733feb39565296f044a1c73835
Signed-off-by: default avatarMohan Srinivasan <srmohan@google.com>
parent 8b5c89d1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -160,6 +160,7 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
			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;
@@ -171,6 +172,7 @@ void mmc_request_done(struct mmc_host *host, struct mmc_request *mrq)
					(mrq->data->flags & MMC_DATA_READ),
					delta_us);
			}
#endif
			trace_mmc_blk_rw_end(cmd->opcode, cmd->arg, mrq->data);
		}

@@ -559,11 +561,13 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
	}

	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);
@@ -2783,6 +2787,7 @@ static void __exit mmc_exit(void)
	destroy_workqueue(workqueue);
}

#ifdef CONFIG_BLOCK
static ssize_t
latency_hist_show(struct device *dev, struct device_attribute *attr, char *buf)
{
@@ -2830,6 +2835,7 @@ mmc_latency_hist_sysfs_exit(struct mmc_host *host)
{
	device_remove_file(&host->class_dev, &dev_attr_latency_hist);
}
#endif

subsys_initcall(mmc_init);
module_exit(mmc_exit);
+4 −2
Original line number Diff line number Diff line
@@ -556,8 +556,9 @@ int mmc_add_host(struct mmc_host *host)
	mmc_add_host_debugfs(host);
#endif
	mmc_host_clk_sysfs_init(host);
#ifdef CONFIG_BLOCK
	mmc_latency_hist_sysfs_init(host);

#endif
	mmc_start_host(host);
	if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
		register_pm_notifier(&host->pm_notify);
@@ -585,8 +586,9 @@ void mmc_remove_host(struct mmc_host *host)
#ifdef CONFIG_DEBUG_FS
	mmc_remove_host_debugfs(host);
#endif

#ifdef CONFIG_BLOCK
	mmc_latency_hist_sysfs_exit(host);
#endif

	device_del(&host->class_dev);

+2 −0
Original line number Diff line number Diff line
@@ -17,8 +17,10 @@
int mmc_register_host_class(void);
void mmc_unregister_host_class(void);

#ifdef CONFIG_BLOCK
void mmc_latency_hist_sysfs_init(struct mmc_host *host);
void mmc_latency_hist_sysfs_exit(struct mmc_host *host);
#endif

#endif
+2 −0
Original line number Diff line number Diff line
@@ -135,8 +135,10 @@ struct mmc_request {
	struct completion	completion;
	void			(*done)(struct mmc_request *);/* completion function */
	struct mmc_host		*host;
#ifdef CONFIG_BLOCK
	ktime_t			io_start;
	int			lat_hist_enabled;
#endif
};

struct mmc_card;