From: Sam Ravnborg <sam@ravnborg.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Felipe Balbi <balbi@ti.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/9] scripts/modpost: add a exception for USB gadget drivers
Date: Wed, 15 Aug 2012 22:14:26 +0200 [thread overview]
Message-ID: <20120815201426.GA6902@merkur.ravnborg.org> (raw)
In-Reply-To: <1345060759-18091-3-git-send-email-bigeasy@linutronix.de>
On Wed, Aug 15, 2012 at 09:59:12PM +0200, Sebastian Andrzej Siewior wrote:
> The "driver" struct for a gadget driver is named *_driver. On module
> load, the gadget expects a UDC driver to be loaded and avaiable. If this
> is not the case => -ENODEV and bye bye. That means that the gadget
> driver is initialized immediately. The initialization process includes
> calling ->bind() for the gadget driver. Therefore it is okay to put this
> in __init. It will never be called again, we don't (yet) allow two
> gadgets of the same kind to be ->bind() again.
>
> Commit 07a18bd716 ("usb gadget: don't save bind callback in struct
> usb_composite_driver") move the ->bind() member from the struct to an
> argument.
> I'm reverting this and adding this exception. For g_zero we save around
> 400bytes. I'm not having the conversion about how important it is to
> save 400 bytes. I wait for configfs interface for the gadget subsystem.
> This will remove the __init from the ->bind() because we will be able to
> call ->bind() more than once and _after_ the init has been dropped.
Could you use the __ref / __refdata annotation?
This would be much cleaner than this hack in modpost.
Sam
next prev parent reply other threads:[~2012-08-15 20:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1345060759-18091-1-git-send-email-bigeasy@linutronix.de>
2012-08-15 19:59 ` [PATCH 2/9] scripts/modpost: add a exception for USB gadget drivers Sebastian Andrzej Siewior
2012-08-15 20:14 ` Sam Ravnborg [this message]
2012-08-17 15:36 ` Sebastian Andrzej Siewior
2012-08-16 13:05 ` ABRAHAM, KISHON VIJAY
2012-08-16 13:03 ` Felipe Balbi
2012-08-16 14:26 ` ABRAHAM, KISHON VIJAY
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=20120815201426.GA6902@merkur.ravnborg.org \
--to=sam@ravnborg.org \
--cc=balbi@ti.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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;
as well as URLs for NNTP newsgroup(s).