cb22 / macbook12-spi-driver

WIP input driver for the SPI touchpad / keyboard found in the 12" MacBook (MacBook8,1 + MacBook9,1)
GNU General Public License v2.0
298 stars 103 forks source link

Second round of cleanups. #54

Closed roadrunner2 closed 6 years ago

roadrunner2 commented 6 years ago

This is a second set of code cleanups - the largest part is the ones flagged by checkpatch (so hopefully that will avoid style complaints when we attempt to upstream this 😉 ).

After this I have some small fixes and enhancements lined up, plus finally the refinement of the packet/message data structures (including support multi-packet messages, and with that for more than 6 fingers).

l1k commented 6 years ago

So this is almost too minor to mention, but just to avoid objections once it gets posted to the mailing list, in 7e51eac, for multi-line comments, kernel convention is to leave the first line empty and for single-line comments to not use caps, e.g.:

    /*
         * The data is stored in pairs of items, first a string containing
     * the name of the item, followed by an 8-byte buffer containing the
     * value in little-endian.
     */

    /* check released keys */

The GPL license text at the top can be replaced with:

    SPDX-License-Identifier: GPL-2.0

Everything else LGTM. Thanks!

cb22 commented 6 years ago

Looks good to me, thanks @roadrunner2!

roadrunner2 commented 6 years ago

@l1k Thanks for the feedback - don't worry about nit-picking, that's fine. Fixed the comments now too, and the license indicator.

@cb22 Pushed a new version of the branch: the changes are just the comment fixes (a new commit), as well as adjusting the copyright header.