public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: arnd@arndb•de (Arnd Bergmann)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 1/7] serial: pxa: add OF support
Date: Tue, 6 Mar 2012 15:02:07 +0000	[thread overview]
Message-ID: <201203061502.08097.arnd@arndb.de> (raw)
In-Reply-To: <1331001730-13429-1-git-send-email-haojian.zhuang@marvell.com>

On Tuesday 06 March 2012, Haojian Zhuang wrote:

> @@ -51,7 +54,7 @@ struct uart_pxa_port {
>  	unsigned char           mcr;
>  	unsigned int            lsr_break_flag;
>  	struct clk		*clk;
> -	char			*name;
> +	char			name[PXA_NAME_LEN];
>  };

This looks better now

>  static inline unsigned int serial_in(struct uart_pxa_port *up, int offset)
> @@ -781,6 +784,33 @@ static const struct dev_pm_ops serial_pxa_pm_ops = {
>  };
>  #endif
>  
> +#ifdef CONFIG_OF
> +static struct of_device_id serial_pxa_dt_ids[] = {
> +	{ .compatible = "mrvl,pxa-uart", },
> +	{ .compatible = "mrvl,mmp-uart", },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, serial_pxa_dt_ids);
> +#endif

If you do this, you have to use of_match_ptr for referencing
serial_pxa_dt_ids or you will get a link error when CONFIG_OF is
disabled.

> @@ -850,6 +876,7 @@ static int serial_pxa_remove(struct platform_device *dev)
>  	platform_set_drvdata(dev, NULL);
>  
>  	uart_remove_one_port(&serial_pxa_reg, &sport->port);
> +	kfree(sport->name);
>  	clk_put(sport->clk);
>  	kfree(sport);
>  

And this must be removed now that sport->name is allocated as part of sport.

	Arnd

  reply	other threads:[~2012-03-06 15:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 12:21 [PATCH v2 0/7] ARM: mmp: support OF on pxa168 Haojian Zhuang
2012-03-05 12:21 ` [PATCH v2 1/7] serial: pxa: add OF support Haojian Zhuang
2012-03-05 12:55   ` Arnd Bergmann
2012-03-05 14:03     ` Haojian Zhuang
2012-03-06  2:42     ` [PATCH v3 " Haojian Zhuang
2012-03-06 15:02       ` Arnd Bergmann [this message]
2012-03-06 15:04         ` Haojian Zhuang
2012-03-07  1:42         ` [PATCH v3 1/6] " Haojian Zhuang
2012-03-07  7:58           ` Arnd Bergmann
2012-03-09 15:24   ` [PATCH v2 1/7] " Grant Likely
2012-04-03 15:45   ` Grant Likely
2012-03-05 12:21 ` [PATCH v2 2/7] rtc: sa1100: " Haojian Zhuang
2012-03-05 14:41   ` Arnd Bergmann
2012-03-05 12:21 ` [PATCH v2 3/7] i2c: pxa: " Haojian Zhuang
2012-03-05 14:41   ` Arnd Bergmann
2012-03-05 12:21 ` [PATCH v2 4/7] ARM: mmp: enable rtc clk in pxa168 Haojian Zhuang
2012-03-05 14:38   ` Arnd Bergmann
2012-03-05 12:21 ` [PATCH v2 5/7] ARM: mmp: append OF support on pxa168 Haojian Zhuang
2012-03-05 14:37   ` Arnd Bergmann
2012-04-09  1:36   ` Chris Ball
2012-04-09  1:46     ` Haojian Zhuang
2012-04-09  1:51       ` Chris Ball
2012-04-09  2:04         ` Haojian Zhuang
2012-04-09  1:43   ` Chris Ball
2012-04-09  1:47     ` Haojian Zhuang
2012-03-05 12:21 ` [PATCH v2 6/7] ARM: dts: append DTS file of pxa168 Haojian Zhuang
2012-03-05 14:35   ` Arnd Bergmann
2012-03-05 12:21 ` [PATCH v2 7/7] Document: devicetree: add OF documents for arch-mmp Haojian Zhuang
2012-03-05 14:46   ` Arnd Bergmann
2012-03-05 15:07     ` Rob Herring
2012-03-05 15:08     ` Cousson, Benoit
2012-04-02 23:21   ` Mitch Bradley

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=201203061502.08097.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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