video: tegra: host: Use unsigned integer in sysfs
Terje Bergstrom [Wed, 29 Aug 2012 05:16:09 +0000 (08:16 +0300)]
Sync point values are unsigned, but sysfs creates the text
representation as signed. Correct to use unsigned representation.

Bug 1039058

Change-Id: I96de13952eeeba9510bae179a036459ddee18dcd
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/128075
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Michal Pecio <mpecio@nvidia.com>

drivers/video/tegra/host/nvhost_syncpt.c

index d30028b..38c28ca 100644 (file)
@@ -344,7 +344,7 @@ static ssize_t syncpt_min_show(struct kobject *kobj,
        struct nvhost_syncpt_attr *syncpt_attr =
                container_of(attr, struct nvhost_syncpt_attr, attr);
 
-       return snprintf(buf, PAGE_SIZE, "%d",
+       return snprintf(buf, PAGE_SIZE, "%u",
                        nvhost_syncpt_read(&syncpt_attr->host->syncpt,
                                syncpt_attr->id));
 }
@@ -355,7 +355,7 @@ static ssize_t syncpt_max_show(struct kobject *kobj,
        struct nvhost_syncpt_attr *syncpt_attr =
                container_of(attr, struct nvhost_syncpt_attr, attr);
 
-       return snprintf(buf, PAGE_SIZE, "%d",
+       return snprintf(buf, PAGE_SIZE, "%u",
                        nvhost_syncpt_read_max(&syncpt_attr->host->syncpt,
                                syncpt_attr->id));
 }