Eric Miao wrote: > On Tue, Sep 9, 2008 at 9:42 AM, Eric Miao <[EMAIL PROTECTED]> wrote: >>>> +static int setup_cs(struct spi_device *spi, struct chip_data *chip, >>>> + struct pxa2xx_spi_chip *chip_info) >>> My understanding is that it is legal to call setup without a defined >>> pointer to a struct pxa2xx_spi_chip in spi_dev->controller_data, if the >>> chip is happy with the defaults (only works for a single chip bus that >>> needs no CS, a degenerate case, but still legal). Thus you should allow >>> for that by always checking for existence (chip_info not NULL) before use. >>> > > Ah, checked again with the source, I don't think setup_cs() > shall continue if (chip_info == NULL), which implies a > null_cs_control(), and is now handled by cs_assert() and > cs_deassert().
Yea, I already noticed that. Oh well. -- Ned Forrester [EMAIL PROTECTED] Oceanographic Systems Lab 508-289-2226 Applied Ocean Physics and Engineering Dept. Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212 http://www.whoi.edu/hpb/Site.do?id=1532 http://www.whoi.edu/page.do?pid=10079 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general