diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2014-05-29 20:21:27 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:10 -0400 |
commit | 15860d77a496772b06266f278476e339b82815e9 (patch) | |
tree | 6025bb77ff5572d90b8aa9cc155f4ae5e374c12f /drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | |
parent | f575bc667649ff1a09aac8ecbe626fde8ea5f2f4 (diff) |
gpu: nvgpu: fix compilation issues with PM disable
Fix gpu driver compilation issues with power mangement
and runtime power management disable.
Change-Id: I8e1873871d6f184013b2142dd0cbc32c67774177
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/417925
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index a9e7274e..eb0aa5d1 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | |||
@@ -332,6 +332,7 @@ static ssize_t elpg_enable_read(struct device *device, | |||
332 | 332 | ||
333 | static DEVICE_ATTR(elpg_enable, ROOTRW, elpg_enable_read, elpg_enable_store); | 333 | static DEVICE_ATTR(elpg_enable, ROOTRW, elpg_enable_read, elpg_enable_store); |
334 | 334 | ||
335 | #ifdef CONFIG_PM_RUNTIME | ||
335 | static ssize_t force_idle_store(struct device *device, | 336 | static ssize_t force_idle_store(struct device *device, |
336 | struct device_attribute *attr, const char *buf, size_t count) | 337 | struct device_attribute *attr, const char *buf, size_t count) |
337 | { | 338 | { |
@@ -380,6 +381,7 @@ static ssize_t force_idle_read(struct device *device, | |||
380 | } | 381 | } |
381 | 382 | ||
382 | static DEVICE_ATTR(force_idle, ROOTRW, force_idle_read, force_idle_store); | 383 | static DEVICE_ATTR(force_idle, ROOTRW, force_idle_read, force_idle_store); |
384 | #endif | ||
383 | 385 | ||
384 | void gk20a_remove_sysfs(struct device *dev) | 386 | void gk20a_remove_sysfs(struct device *dev) |
385 | { | 387 | { |
@@ -395,7 +397,9 @@ void gk20a_remove_sysfs(struct device *dev) | |||
395 | device_remove_file(dev, &dev_attr_load); | 397 | device_remove_file(dev, &dev_attr_load); |
396 | device_remove_file(dev, &dev_attr_railgate_delay); | 398 | device_remove_file(dev, &dev_attr_railgate_delay); |
397 | device_remove_file(dev, &dev_attr_clockgate_delay); | 399 | device_remove_file(dev, &dev_attr_clockgate_delay); |
400 | #ifdef CONFIG_PM_RUNTIME | ||
398 | device_remove_file(dev, &dev_attr_force_idle); | 401 | device_remove_file(dev, &dev_attr_force_idle); |
402 | #endif | ||
399 | 403 | ||
400 | if (g->host1x_dev && (dev->parent != &g->host1x_dev->dev)) | 404 | if (g->host1x_dev && (dev->parent != &g->host1x_dev->dev)) |
401 | sysfs_remove_link(&dev->kobj, dev_name(dev)); | 405 | sysfs_remove_link(&dev->kobj, dev_name(dev)); |
@@ -416,7 +420,9 @@ void gk20a_create_sysfs(struct platform_device *dev) | |||
416 | error |= device_create_file(&dev->dev, &dev_attr_load); | 420 | error |= device_create_file(&dev->dev, &dev_attr_load); |
417 | error |= device_create_file(&dev->dev, &dev_attr_railgate_delay); | 421 | error |= device_create_file(&dev->dev, &dev_attr_railgate_delay); |
418 | error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay); | 422 | error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay); |
423 | #ifdef CONFIG_PM_RUNTIME | ||
419 | error |= device_create_file(&dev->dev, &dev_attr_force_idle); | 424 | error |= device_create_file(&dev->dev, &dev_attr_force_idle); |
425 | #endif | ||
420 | 426 | ||
421 | if (g->host1x_dev && (dev->dev.parent != &g->host1x_dev->dev)) | 427 | if (g->host1x_dev && (dev->dev.parent != &g->host1x_dev->dev)) |
422 | error |= sysfs_create_link(&g->host1x_dev->dev.kobj, | 428 | error |= sysfs_create_link(&g->host1x_dev->dev.kobj, |