diff options
| author | Colin Cross <ccross@android.com> | 2013-08-22 19:29:44 -0700 | 
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2013-09-19 23:03:33 -0500 | 
| commit | 66df93b4c9e78cf433b76d7fe3da4cc7fd06c36b (patch) | |
| tree | 09f8789b833466ff44049872584de986d73ff8d9 /drivers | |
| parent | 002119eeb221cf1efd7afda836da768ff1cd0ad9 (diff) | |
| download | olio-linux-3.10-66df93b4c9e78cf433b76d7fe3da4cc7fd06c36b.tar.xz olio-linux-3.10-66df93b4c9e78cf433b76d7fe3da4cc7fd06c36b.zip | |
ion: don't use id 0 for handle cookie
ion userspace clients think that the cookie is a pointer, so they
use NULL to check if the handle has been initialized.  Set the first
id number to 1.
Change-Id: Ifb9af6029a8b08f57e41bc6160cc11e11001a2a9
Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/ion/ion.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c index 9f73052c392..1d4c8876ab5 100644 --- a/drivers/gpu/ion/ion.c +++ b/drivers/gpu/ion/ion.c @@ -424,7 +424,7 @@ static int ion_handle_add(struct ion_client *client, struct ion_handle *handle)  		rc = idr_pre_get(&client->idr, GFP_KERNEL);  		if (!rc)  			return -ENOMEM; -		rc = idr_get_new(&client->idr, handle, &id); +		rc = idr_get_new_above(&client->idr, handle, 1, &id);  		handle->id = id;  	} while (rc == -EAGAIN); |