From: helen@koikeco.de (Helen Koike)
To: kernelnewbies@lists.kernelnewbies.org
Subject: kobj->state_initialized is never set to 0
Date: Fri, 20 Jul 2018 15:33:22 -0300 [thread overview]
Message-ID: <CAPW4XYai0qOy+6T8hP9A3QgG5PCfYHo6pp=U-HOk7-zFuUosiA@mail.gmail.com> (raw)
Hi,
I am simulating hotplugging a platform device (to the
media/platform/vimc driver), so I register it using
platform_device_register, then I unregister it with
platform_device_unregister, then I register it again, but the code
doesn't allow me to register something that was registered before due
to this line:
https://github.com/torvalds/linux/blob/master/lib/kobject.c#L334
The variable kobj->state_initialized is set to 1 at
https://github.com/torvalds/linux/blob/master/lib/kobject.c#L194
but it is never set to 0 again.
Is this how it is supposed to work? Or kobj->state_initialized is set
to 0 somewhere else I couldn't find?
Thanks
Helen
next reply other threads:[~2018-07-20 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-20 18:33 Helen Koike [this message]
2018-07-20 18:39 ` kobj->state_initialized is never set to 0 Greg KH
2018-08-10 16:39 ` Helen Koike
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='CAPW4XYai0qOy+6T8hP9A3QgG5PCfYHo6pp=U-HOk7-zFuUosiA@mail.gmail.com' \
--to=helen@koikeco.de \
--cc=kernelnewbies@lists.kernelnewbies.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).