public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Greg KH <greg@kroah.com>
Subject: [PATCH] pci: Schedule removal of pci_module_init (was Re: [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h:)
Date: Sat, 03 Dec 2005 02:34:12 +0100	[thread overview]
Message-ID: <4390F614.7060202@student.ltu.se> (raw)
In-Reply-To: <20051201152210.517b936d.akpm@osdl.org>

Andrew Morton wrote:

>Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>  
>
>> +#if 0
>>  /*
>>   * pci_module_init is obsolete, this stays here till we fix up all usages of it
>>   * in the tree.
>>   */
>>  #define pci_module_init	pci_register_driver
>> +#endif
>>    
>>
>
>This one's a bit optimistic.  We need to wait until Linus's patch is fully
>converted, than wait a bit.
>
>You might investigate turning this into an inline function, then mark it
>__deprecated and generate a Documentation/feature-removal-schedule.txt
>record for it.
>-
>
From: Richard Knutsson <ricknu-0@student.ltu.se>

Scheduled the removal of pci_module_init and __deprecated the function, 
as suggested by Andrew.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---

diff -Narup a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
--- a/Documentation/feature-removal-schedule.txt	2005-11-29 11:08:41.000000000 +0100
+++ b/Documentation/feature-removal-schedule.txt	2005-12-03 01:21:46.000000000 +0100
@@ -159,3 +159,10 @@ Why:	The 8250 serial driver now has the 
 	brother on Alchemy SOCs.  The loss of features is not considered an
 	issue.
 Who:	Ralf Baechle <ralf@linux-mips.org>
+
+---------------------------
+
+What:	pci_module_init(driver)
+When:	April 2006
+Why:	Is replaced by pci_register_driver(pci_driver).
+Who:	Richard Knutsson <ricknu-0@student.ltu.se>
diff -Narup a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	2005-11-29 11:09:05.000000000 +0100
+++ b/include/linux/pci.h	2005-12-03 01:40:40.000000000 +0100
@@ -277,12 +277,6 @@ struct pci_driver {
 	.vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
 	.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
 
-/*
- * pci_module_init is obsolete, this stays here till we fix up all usages of it
- * in the tree.
- */
-#define pci_module_init	pci_register_driver
-
 /* these external functions are only available when PCI support is enabled */
 #ifdef CONFIG_PCI
 
@@ -434,6 +428,10 @@ void pci_enable_bridges(struct pci_bus *
 
 /* Proper probing supporting hot-pluggable devices */
 int __pci_register_driver(struct pci_driver *, struct module *);
+static inline int __deprecated pci_module_init(struct pci_driver *driver)
+{
+	return __pci_register_driver(driver, THIS_MODULE);
+}
 static inline int pci_register_driver(struct pci_driver *driver)
 {
 	return __pci_register_driver(driver, THIS_MODULE);
@@ -553,6 +551,7 @@ static inline void pci_disable_device(st
 static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; }
 static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;}
 static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;}
+static inline int __deprecated pci_module_init(struct pci_driver *driver) { return 0; }
 static inline int pci_register_driver(struct pci_driver *drv) { return 0;}
 static inline void pci_unregister_driver(struct pci_driver *drv) { }
 static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }



      reply	other threads:[~2005-12-03  1:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01 12:58 [PATCH 2.6.15-rc3-mm1 0/3] -mm patches to replace pci_module_init() with pci_register_driver() Richard Knutsson
2005-12-01 12:58 ` [PATCH 2.6.15-rc3-mm1 1/3] drivers: Replace pci_module_init() with pci_register_driver() in -mm Richard Knutsson
2005-12-01 12:59 ` [PATCH 2.6.15-rc3-mm1 2/3] sound: " Richard Knutsson
2005-12-01 12:59 ` [PATCH 2.6.15-rc3(-mm1) 3/3] pci.h: Richard Knutsson
2005-12-01 23:22   ` Andrew Morton
2005-12-03  1:34     ` Richard Knutsson [this message]

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=4390F614.7060202@student.ltu.se \
    --to=ricknu-0@student.ltu.se \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.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