From: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Thomas Kavanagh
<tkavanagh-3r7Miqu9kMnR7s880joybQ@public.gmane.org>,
Guenter Roeck <groeck-3r7Miqu9kMnR7s880joybQ@public.gmane.org>
Subject: Re: [PATCH v2 RESEND] i2c: (algo-pca) Fix chip reset function for PCA9665
Date: Sat, 6 Oct 2012 12:27:24 +0200 [thread overview]
Message-ID: <20121006102724.GA25375@pengutronix.de> (raw)
In-Reply-To: <1348197646-5864-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]
On Thu, Sep 20, 2012 at 08:20:46PM -0700, Guenter Roeck wrote:
> From: Thomas Kavanagh <tkavanagh-3r7Miqu9kMnR7s880joybQ@public.gmane.org>
>
> The parameter passed to pca9665_reset is adap->data (which is bus driver
> specific), not i2c_algp_pca_data *adap. pca9665_reset expects it to be
> i2c_algp_pca_data *adap. All other wrappers from the algo call back to
> the bus driver, which knows to handle its custom data. Only pca9665_reset
> resides inside the algorithm code and does not know how to handle a custom
> data structure. This can result in a kernel crash.
>
> Fix by re-factoring pca_reset() from a macro to a function handling chip
> specific code, and only call adap->reset_chip() if the chip is not PCA9665.
>
> Cc: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Signed-off-by: Thomas Kavanagh <tkavanagh-3r7Miqu9kMnR7s880joybQ@public.gmane.org>
> Signed-off-by: Guenter Roeck <groeck-3r7Miqu9kMnR7s880joybQ@public.gmane.org>
Applied to next, thanks!
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2012-10-06 10:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-21 3:20 [PATCH v2 RESEND] i2c: (algo-pca) Fix chip reset function for PCA9665 Guenter Roeck
[not found] ` <1348197646-5864-1-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2012-10-06 10:27 ` Wolfram Sang [this message]
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=20121006102724.GA25375@pengutronix.de \
--to=w.sang-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=groeck-3r7Miqu9kMnR7s880joybQ@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tkavanagh-3r7Miqu9kMnR7s880joybQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).