From: Jiri Slaby <jirislaby@gmail.com>
To: chripell@gmail.com
Cc: linux-kernel@vger.kernel.org, Christian Pellegrin <chripell@fsfe.org>
Subject: Re: [PATCH] max3100 driver
Date: Mon, 17 Dec 2007 09:45:26 +0100 [thread overview]
Message-ID: <47663726.3010508@gmail.com> (raw)
In-Reply-To: <1197879438299-git-send-email-chripell@gmail.com>
On 12/17/2007 09:17 AM, chripell@gmail.com wrote:
> This patch adds support for the MAX3100 SPI UART.
>
> Generated on 20071217 against v2.6.23
>
> Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
> ---
> drivers/serial/Kconfig | 7 +
> drivers/serial/Makefile | 1 +
> drivers/serial/max3100.c | 956 ++++++++++++++++++++++++++++++++++++++++
> include/linux/serial_max3100.h | 25 +
> 4 files changed, 989 insertions(+), 0 deletions(-)
>
[...]
> diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c
> new file mode 100644
> index 0000000..d07936d
> --- /dev/null
> +++ b/drivers/serial/max3100.c
[...]
> +static int __devexit max3100_remove(struct spi_device *spi)
> +{
> + int i;
> +
> + i = 0;
> +
> + for (i = 0; i < MAX_MAX3100; i++)
> + if (max3100s[i] && max3100s[i]->ref_count > 0)
> + return -EBUSY;
> +
> + for (i = 0; i < MAX_MAX3100; i++)
> + if (max3100s[i]) {
> + tty_unregister_device(serial_driver, i);
> + kfree(max3100s[i]);
> + max3100s[i] = NULL;
> + }
> +
> + if (serial_driver)
> + tty_unregister_driver(serial_driver);
You probably wanted to unregister it after _all_ cards are removed, not after
each...
> + return 0;
> +}
> +
> +#ifdef CONFIG_PM
> +static int max3100_suspend(struct spi_device *spi, pm_message_t state)
> +{
> + struct max3100_port_s *s = dev_get_drvdata(&spi->dev);
> + u16 tx, rx;
> +
> + tx = MAX3100_WC | MAX3100_SHDN;
> + max3100_sr(s, tx, &rx, 0);
Also you should synchronize_irq() after stopping them here.
> + return 0;
> +}
regards,
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
next prev parent reply other threads:[~2007-12-17 8:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 8:17 [PATCH] max3100 driver chripell
2007-12-17 8:45 ` Jiri Slaby [this message]
2007-12-17 8:55 ` chri
2007-12-17 9:00 ` Jiri Slaby
-- strict thread matches above, loose matches on Subject: below --
2008-09-20 10:51 Michael Trimarchi
2008-09-20 7:20 Christian Pellegrin
2008-09-20 8:24 ` Andrew Morton
2008-09-20 10:35 ` chri
2008-09-20 13:56 ` Arjan van de Ven
2008-09-20 14:30 ` chri
2008-09-20 14:34 ` Alan Cox
2008-09-21 16:09 ` Ben Pfaff
2008-10-09 6:23 ` chri
2008-10-10 12:08 ` Christian Pellegrin
2008-09-20 14:11 ` Alan Cox
2008-09-20 14:37 ` chri
2008-10-09 6:30 ` chri
2008-10-09 9:18 ` Alan Cox
2007-12-05 10:26 chripell
2007-12-12 9:49 ` Andrew Morton
2007-12-12 11:58 ` chri
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=47663726.3010508@gmail.com \
--to=jirislaby@gmail.com \
--cc=chripell@fsfe.org \
--cc=chripell@gmail.com \
--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