提交 fc56f2ec 编写于 作者: S Serban Constantinescu 提交者: Greg Kroah-Hartman

staging: android: binder: fix BC_FREE_BUFFER ioctl declaration

BinderDriverCommands mirror the ioctl usage. Thus the size of the
structure passed through the interface should be used to generate the
ioctl No.

The change reflects the type being passed from the user space-a pointer
to a binder_buffer. This change should not affect the existing 32bit
user space since BC_FREE_BUFFER is computed as:

   #define _IOW(type,nr,size)         \
      ((type) << _IOC_TYPESHIFT) |    \
      ((nr)   << _IOC_NRSHIFT) |      \
      ((size) << _IOC_SIZESHIFT))

and for a 32bit compiler BC_FREE_BUFFER will have the same computed
value. This change will also ease our work in differentiating
BC_FREE_BUFFER from COMPAT_BC_FREE_BUFFER.

The change does not affect existing 32bit ABI.
Signed-off-by: NSerban Constantinescu <serban.constantinescu@arm.com>
Acked-by: NArve Hjønnevåg <arve@android.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a9350fc8
...@@ -265,7 +265,7 @@ enum binder_driver_command_protocol { ...@@ -265,7 +265,7 @@ enum binder_driver_command_protocol {
* Else you have acquired a primary reference on the object. * Else you have acquired a primary reference on the object.
*/ */
BC_FREE_BUFFER = _IOW('c', 3, int), BC_FREE_BUFFER = _IOW('c', 3, void *),
/* /*
* void *: ptr to transaction data received on a read * void *: ptr to transaction data received on a read
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册