From: arvind Yadav <arvind.yadav.cs@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] ESIA : Dummy eisa_driver_register should return error code
Date: Tue, 19 Jul 2016 21:20:11 +0530 [thread overview]
Message-ID: <578E4C33.2070200@gmail.com> (raw)
In-Reply-To: <20160719043152.GA27579@infradead.org>
SCSI_AHA1740 : This is support for a SCSI host adapter.
If CONFIG_EISA is disable then we should not register eisa driver.
static __init int aha1740_init (void)
{
return eisa_driver_register (&aha1740_driver);
}
static __exit void aha1740_exit (void)
{
eisa_driver_unregister (&aha1740_driver);
}
module_init (aha1740_init);
module_exit (aha1740_exit);
----------------------------------------
-Shall we add check by using CONFIG_EISA. We can avoid to register a dummy
driver.
static __init int aha1740_init (void)
{
int err = 0;
#ifdef CONFIG_EISA
err = eisa_driver_register (&aha1740_driver);
#endif
return err;
}
static __exit void aha1740_exit (void)
{
#ifdef CONFIG_EISA
eisa_driver_unregister (&aha1740_driver);
#endif
}
On Tuesday 19 July 2016 10:01 AM, Christoph Hellwig wrote:
> On Tue, Jul 19, 2016 at 12:15:01AM +0530, Arvind Yadav wrote:
>> The inline eisa_driver_register stub simply allows compilation on
>> systems with CONFIG_EISA disabled. the dummy eisa_driver_register
>> does not register an *_eisa_driver at all. The inline
>> eisa_driver_register should return to indicate lack of support
>> when attempting to register an *_eisa_driver on such a system with
>> CONFIG_EISA disabled.
> Why? The idea is that you can simply leave the stub in if registering
> say PCI / EISA. With your change such a driver will fail to load even
> if it could serve PCI device in a !CONFIG_EISA config, which is the
> behavior we want.
prev parent reply other threads:[~2016-07-19 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 18:45 [PATCH v1] ESIA : Dummy eisa_driver_register should return error code Arvind Yadav
2016-07-19 4:31 ` Christoph Hellwig
2016-07-19 15:50 ` arvind Yadav [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=578E4C33.2070200@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=hch@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.