lkml.org 
[lkml]   [2014]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] i2c documentation: rename variable "register" to "reg"
On Wed, Aug 27, 2014 at 10:54:21PM +0300, José Manuel Alarcón Roldán wrote:
> The example code provided with the i2c device interface documentation
> won't compile since it uses the reserved word "register" to name a
> variable.
>
> The compiler fails with this error message:
>
> error: expected identifier or '(' before '=' token
> __u8 register = 0x20; /* Device register to access */
> ^
>
> Rename the variable "register" to simply "reg"
> in the example code.
>
> Signed-off-by: Jose Alarcon Roldan <jose.alarcon.roldan@gmail.com>

Acked-by: Wolfram Sang <wsa@the-dreams.de>

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-08-27 22:21    [W:0.041 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site