mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michał Mirosław" <mirqus@gmail.com>
To: "Németh Márton" <nm127@freemail.hu>
Cc: linux-serial@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Julia Lawall <julia@diku.dk>,
	cocci@diku.dk
Subject: Re: [PATCH 3/3] serial: make PCI device id constant
Date: Sun, 10 Jan 2010 18:51:42 +0100	[thread overview]
Message-ID: <e2d7436a1001100951w4dd7139as96e5808872f5c926@mail.gmail.com> (raw)
In-Reply-To: <4B4A077C.7020406@freemail.hu>

2010/1/10 Németh Márton <nm127@freemail.hu>:
> From: Márton Németh <nm127@freemail.hu>
>
> The id_table field of the struct pci_driver is constant in <linux/pci.h>
> so it is worth to make initialization data also constant.
[...]
> diff -u -p a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
> --- a/drivers/serial/8250_pci.c 2009-12-03 04:51:21.000000000 +0100
> +++ b/drivers/serial/8250_pci.c 2010-01-08 18:40:05.000000000 +0100
> @@ -2567,7 +2567,7 @@ static int pciserial_resume_one(struct p
>  }
>  #endif
>
> -static struct pci_device_id serial_pci_tbl[] = {
> +static const struct pci_device_id serial_pci_tbl[] = {
>        /* Advantech use PCI_DEVICE_ID_ADVANTECH_PCI3620 (0x3620) as 'PCI_SUBVENDOR_ID' */
>        {       PCI_VENDOR_ID_ADVANTECH, PCI_DEVICE_ID_ADVANTECH_PCI3620,
>                PCI_DEVICE_ID_ADVANTECH_PCI3620, 0x0001, 0, 0,
[...]

There was similar patch sent to netdev couple days ago. For PCI
devices it used DEFINE_PCI_DEVICE_TABLE() like this:

static DEFINE_PCI_DEVICE_TABLE(serial_pci_tbl) = {

so that the ID data went to the proper .ko section.

Best Regards,
Michał Mirosław

  reply	other threads:[~2010-01-10 17:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-10 16:59 Németh Márton
2010-01-10 17:51 ` Michał Mirosław [this message]
2010-01-10 19:43   ` Németh Márton

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=e2d7436a1001100951w4dd7139as96e5808872f5c926@mail.gmail.com \
    --to=mirqus@gmail.com \
    --cc=cocci@diku.dk \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nm127@freemail.hu \
    /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

all inboxes | Powered by JetHome®