mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
mhi: core: remove duplicate timesync sysfs functions
Remove duplicate timesync sysfs functions as they have moved to a different file. Change-Id: Ia1988f32eb6bf16914564977d09ba7ee81022335 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
34e46f48e9
commit
9298cd3636
1 changed files with 0 additions and 69 deletions
|
|
@ -797,75 +797,6 @@ static void mhi_assign_of_node(struct mhi_controller *mhi_cntrl,
|
|||
}
|
||||
}
|
||||
|
||||
static ssize_t time_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct mhi_device *mhi_dev = to_mhi_device(dev);
|
||||
struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
|
||||
u64 t_host, t_device;
|
||||
int ret;
|
||||
|
||||
ret = mhi_get_remote_time_sync(mhi_dev, &t_host, &t_device);
|
||||
if (ret) {
|
||||
MHI_ERR("Failed to obtain time, ret:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return scnprintf(buf, PAGE_SIZE, "local: %llu remote: %llu (ticks)\n",
|
||||
t_host, t_device);
|
||||
}
|
||||
static DEVICE_ATTR_RO(time);
|
||||
|
||||
static ssize_t time_us_show(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct mhi_device *mhi_dev = to_mhi_device(dev);
|
||||
struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
|
||||
u64 t_host, t_device;
|
||||
int ret;
|
||||
|
||||
ret = mhi_get_remote_time_sync(mhi_dev, &t_host, &t_device);
|
||||
if (ret) {
|
||||
MHI_ERR("Failed to obtain time, ret:%d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return scnprintf(buf, PAGE_SIZE, "local: %llu remote: %llu (us)\n",
|
||||
LOCAL_TICKS_TO_US(t_host),
|
||||
REMOTE_TICKS_TO_US(t_device));
|
||||
}
|
||||
static DEVICE_ATTR_RO(time_us);
|
||||
|
||||
static struct attribute *mhi_tsync_attrs[] = {
|
||||
&dev_attr_time.attr,
|
||||
&dev_attr_time_us.attr,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct attribute_group mhi_tsync_group = {
|
||||
.attrs = mhi_tsync_attrs,
|
||||
};
|
||||
|
||||
void mhi_destroy_timesync(struct mhi_controller *mhi_cntrl)
|
||||
{
|
||||
if (mhi_cntrl->mhi_tsync) {
|
||||
mutex_lock(&mhi_cntrl->tsync_mutex);
|
||||
sysfs_remove_group(&mhi_cntrl->mhi_dev->dev.kobj,
|
||||
&mhi_tsync_group);
|
||||
kfree(mhi_cntrl->mhi_tsync);
|
||||
mhi_cntrl->mhi_tsync = NULL;
|
||||
mutex_unlock(&mhi_cntrl->tsync_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
int mhi_create_timesync_sysfs(struct mhi_controller *mhi_cntrl)
|
||||
{
|
||||
return sysfs_create_group(&mhi_cntrl->mhi_dev->dev.kobj,
|
||||
&mhi_tsync_group);
|
||||
}
|
||||
|
||||
/* bind mhi channels into mhi devices */
|
||||
void mhi_create_devices(struct mhi_controller *mhi_cntrl)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue