diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2016-01-25 16:01:58 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:18:41 -0700 |
commit | da324cf8f6ee36e5da13d543927ab6e077fb6531 (patch) | |
tree | 36726140fa3ce772660635dfcde66d49dca5021f /drivers/gpu/msm/adreno_profile.c | |
parent | 11d4029da91508ea4bc4ca66ea5bd3c333ef591b (diff) |
msm: kgsl: Add and use KGSL_DEVICE macro
Add a helper macro to convert an adreno_device pointer to a
struct kgsl_device pointer. This is mostly syntatic sugar
but it makes the code a bit cleaner and it abstracts a bit of
the ugliness away.
Change-Id: Ic0dedbadd97bda3316a58514a5a64757bd4154c7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm/adreno_profile.c')
-rw-r--r-- | drivers/gpu/msm/adreno_profile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/msm/adreno_profile.c b/drivers/gpu/msm/adreno_profile.c index 1f73db223a0a..c4fab8a5528a 100644 --- a/drivers/gpu/msm/adreno_profile.c +++ b/drivers/gpu/msm/adreno_profile.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -364,7 +364,6 @@ static bool _add_to_assignments_list(struct adreno_profile *profile, static bool results_available(struct adreno_device *adreno_dev, struct adreno_profile *profile, unsigned int *shared_buf_tail) { - struct kgsl_device *device = &adreno_dev->dev; unsigned int global_eop; unsigned int off = profile->shared_tail; unsigned int *shared_ptr = (unsigned int *) @@ -379,7 +378,7 @@ static bool results_available(struct adreno_device *adreno_dev, if (shared_buf_empty(profile)) return false; - if (adreno_rb_readtimestamp(device, + if (adreno_rb_readtimestamp(adreno_dev, adreno_dev->cur_rb, KGSL_TIMESTAMP_RETIRED, &global_eop)) return false; @@ -1062,7 +1061,7 @@ DEFINE_SIMPLE_ATTRIBUTE(profile_enable_fops, void adreno_profile_init(struct adreno_device *adreno_dev) { - struct kgsl_device *device = &adreno_dev->dev; + struct kgsl_device *device = KGSL_DEVICE(adreno_dev); struct adreno_profile *profile = &adreno_dev->profile; struct dentry *profile_dir; int ret; @@ -1108,7 +1107,7 @@ void adreno_profile_close(struct adreno_device *adreno_dev) profile->log_tail = NULL; profile->shared_head = 0; profile->shared_tail = 0; - kgsl_free_global(&adreno_dev->dev, &profile->shared_buffer); + kgsl_free_global(KGSL_DEVICE(adreno_dev), &profile->shared_buffer); profile->shared_size = 0; profile->assignment_count = 0; |