staging: android: binder: fix BC_FREE_BUFFER ioctl declaration
authorSerban Constantinescu <serban.constantinescu@arm.com>
Thu, 4 Jul 2013 09:54:45 +0000 (10:54 +0100)
committerArve Hjønnevåg <arve@android.com>
Sat, 1 Feb 2014 01:35:41 +0000 (01:35 +0000)
commit032f0c2707ac7f21114eda0889bacda10156a2da
treed98003aed4505b7dd54d07c158ef1ec1448fdb4a
parenta0bd9ce4b5492666ffdbfe1cb71b236900a4a64e
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.

Change-Id: I2e0ae87bc4e913225a8eb2912913f7e3617cb575
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Acked-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/uapi/binder.h