From: Peter Korsgaard <jacmet@sunsite.dk>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mcp23s08: isolate spi specific parts
Date: Fri, 15 Jul 2011 08:57:24 +0200 [thread overview]
Message-ID: <87aacgav57.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20110715025358.GZ2927@ponder.secretlab.ca> (Grant Likely's message of "Thu, 14 Jul 2011 20:53:58 -0600")
>>>>> "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
next prev parent reply other threads:[~2011-07-15 6:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-14 19:59 [PATCH 0/3] gpio/mcp23s08: add support for i2c variants Peter Korsgaard
2011-07-14 19:59 ` [PATCH 1/3] mcp23s08: remove unused work queue Peter Korsgaard
2011-07-15 2:53 ` Grant Likely
2011-07-15 6:54 ` Peter Korsgaard
2011-07-14 19:59 ` [PATCH 2/3] mcp23s08: isolate spi specific parts Peter Korsgaard
2011-07-15 2:53 ` Grant Likely
2011-07-15 6:57 ` Peter Korsgaard [this message]
2011-07-14 19:59 ` [PATCH 3/3] mcp23s08: add i2c support Peter Korsgaard
2011-07-15 2:53 ` Grant Likely
2011-07-15 7:03 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aacgav57.fsf@macbook.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox