mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Samuelson <peter@cadcamlab.org>
To: Rasmus Andersen <rasmus@jaquet.dk>
Cc: Pavel Machek <pavel@suse.cz>,
	perex@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove warning from drivers/net/hp100.c (240-test12-pre7)
Date: Mon, 11 Dec 2000 18:09:31 -0600 (CST)	[thread overview]
Message-ID: <14901.27835.458672.526580@wire.cadcamlab.org> (raw)
In-Reply-To: <20001208211908.D599@jaquet.dk> <20001209101924.A126@bug.ucw.cz> <20001209163740.U6567@cadcamlab.org> <20001211213208.B600@jaquet.dk>


[Rasmus Andersen]
> How about this patch? It moves the offending struct to the __init
> function where it is used and inside an existing #ifdef CONFIG_PCI.

Hmmmm, if you're messing around with the pci device table, why not just
convert it to use new-style PCI init?  This is fairly easy to do (I did
one driver myself, and that *proves* it's easy).  The main points:

 1) convert the device table to a 'struct pci_device_id' and reference
    this struct with a call to MODULE_DEVICE_TABLE(my_struct)
 2) create a 'struct pci_driver' function table, rearranging the driver
    housekeeping functions to fit this table
 3) convert your PCI probe loop inn your init function to use
    pci_module_init(my_pci_driver_struct), which does the looping for
    you

Thanks to Adam Richter's hard work, there are lots of examples of
drivers that have already been converted to this scheme.  I don't
remember if Adam purposely skipped hp100.c or if it was an oversight.

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-12  0:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-08 20:19 Rasmus Andersen
2000-12-09  9:19 ` Pavel Machek
2000-12-09 22:37   ` Peter Samuelson
2000-12-11 20:32     ` Rasmus Andersen
2000-12-12  0:09       ` Peter Samuelson [this message]
2000-12-12 13:49         ` Rasmus Andersen

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=14901.27835.458672.526580@wire.cadcamlab.org \
    --to=peter@cadcamlab.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=perex@suse.cz \
    --cc=rasmus@jaquet.dk \
    /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®