The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Richard Knutsson <ricknu-0@student.ltu.se>
To: ballabio_dario@emc.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] eisa.h - implement stub-functions if !CONFIG_EISA
Date: Sun, 06 Nov 2005 01:40:01 +0100	[thread overview]
Message-ID: <436D50E1.2020007@student.ltu.se> (raw)

Implement stub-functions if !CONFIG_EISA.

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

---

To reduce the need for #ifdef CONFIG_EISA in drivers.
2.6.14-git8

diff -Narup a/include/linux/eisa.h b/include/linux/eisa.h
--- a/include/linux/eisa.h	2005-11-05 22:02:08.000000000 +0200
+++ b/include/linux/eisa.h	2005-11-06 00:49:38.000000000 +0100
@@ -68,8 +68,14 @@ struct eisa_driver {
 #define to_eisa_driver(drv) container_of(drv,struct eisa_driver, driver)
 
 extern struct bus_type eisa_bus_type;
+
+#ifdef CONFIG_EISA
 int eisa_driver_register (struct eisa_driver *edrv);
 void eisa_driver_unregister (struct eisa_driver *edrv);
+#else
+static inline int eisa_driver_register (struct eisa_driver *edrv) { return 0; }
+static inline void eisa_driver_unregister (struct eisa_driver *edrv) { }
+#endif
 
 /* Mimics pci.h... */
 static inline void *eisa_get_drvdata (struct eisa_device *edev)
@@ -96,7 +102,11 @@ struct eisa_root_device {
 	struct resource  eisa_root_res;	/* ditto */
 };
 
+#ifdef CONFIG_EISA
 int eisa_root_register (struct eisa_root_device *root);
+#else
+static inline int eisa_root_register (struct eisa_root_device *root) { return 0; }
+#endif
 
 #ifdef CONFIG_EISA
 extern int EISA_bus;



                 reply	other threads:[~2005-11-06  0:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=436D50E1.2020007@student.ltu.se \
    --to=ricknu-0@student.ltu.se \
    --cc=ballabio_dario@emc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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