lkml.org 
[lkml]   [2011]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] mcp23s08: isolate spi specific parts
Date
>>>>> "Grant" == Grant Likely <grant.likely@secretlab.ca> writes:

Grant> On Thu, Jul 14, 2011 at 09:59:27PM +0200, Peter Korsgaard wrote:
>> Change spi member of struct mcp23s08 to be a ops-specific opaque data
>> pointer, and move spi specific knowledge out of mcp23s08_probe_one().
>>
>> No functional change, but is needed to add i2c support.
>>
>> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
>> ---
>> drivers/gpio/mcp23s08.c | 75 ++++++++++++++++++++++++++++++++--------------
>> static int __init mcp23s08_init(void)
>> {
>> - return spi_register_driver(&mcp23s08_driver);
>> + int ret = 0;

Grant> '= 0' is redundant.

Will fix.

>> +
>> +#ifdef CONFIG_SPI_MASTER
>> + ret = spi_register_driver(&mcp23s08_driver);
>> + if (ret)
>> + return ret;
>> +#endif /* CONFIG_SPI_MASTER */
>> +
>> + return ret;

Grant> This change really belongs in the 3rd patch that adds the i2c
Grant> registration.

You can argue for both ways. With my approach the 3rd patch doesn't
touch any of the spi stuff, but OK - I'll change.


--
Bye, Peter Korsgaard


\
 
 \ /
  Last update: 2011-07-15 08:59    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean