Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Unregisrtering a platform driver from another platform driver.
@ 2015-01-21 10:27 Andy Ng
  2015-01-21 11:15 ` Arnd Bergmann
  2015-01-21 13:49 ` Russell King - ARM Linux
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Ng @ 2015-01-21 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Colleagues,

I would like to call "platform_driver_unregister" for a static module
A from a static  module B.
The static module A register its name  "physmap-flash".

Is there any kernel API to search and find the "physmap-flash" device,
and then call unregistered with "platform_driver_unregister" from
module B.

Any advice will be very much appreciated.

Best regards
A

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Unregisrtering a platform driver from another platform driver.
  2015-01-21 10:27 Unregisrtering a platform driver from another platform driver Andy Ng
@ 2015-01-21 11:15 ` Arnd Bergmann
  2015-01-21 12:10   ` Andy Ng
  2015-01-21 13:49 ` Russell King - ARM Linux
  1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-01-21 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 21 January 2015 10:27:35 Andy Ng wrote:
> Dear Colleagues,
> 
> I would like to call "platform_driver_unregister" for a static module
> A from a static  module B.
> The static module A register its name  "physmap-flash".
> 
> Is there any kernel API to search and find the "physmap-flash" device,
> and then call unregistered with "platform_driver_unregister" from
> module B.

I assume you don't actually mean platform_driver_unregister(), as
that would remove the entire driver, not just the connection between
the driver and the device.
 
> Any advice will be very much appreciated.

You can do it from user space using the 'unbind' attribute, but I suppose
that's not what you want.

Can you describe why you want to unbind the device?

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Unregisrtering a platform driver from another platform driver.
  2015-01-21 11:15 ` Arnd Bergmann
@ 2015-01-21 12:10   ` Andy Ng
  2015-01-21 13:13     ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Ng @ 2015-01-21 12:10 UTC (permalink / raw)
  To: linux-arm-kernel

Thank you for your reply.
It is during the kernel boot phase, and I just want to remove it with
unregister mechanism.


On Wed, Jan 21, 2015 at 11:15 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 21 January 2015 10:27:35 Andy Ng wrote:
>> Dear Colleagues,
>>
>> I would like to call "platform_driver_unregister" for a static module
>> A from a static  module B.
>> The static module A register its name  "physmap-flash".
>>
>> Is there any kernel API to search and find the "physmap-flash" device,
>> and then call unregistered with "platform_driver_unregister" from
>> module B.
>
> I assume you don't actually mean platform_driver_unregister(), as
> that would remove the entire driver, not just the connection between
> the driver and the device.
>
>> Any advice will be very much appreciated.
>
> You can do it from user space using the 'unbind' attribute, but I suppose
> that's not what you want.
>
> Can you describe why you want to unbind the device?
>
>         Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Unregisrtering a platform driver from another platform driver.
  2015-01-21 12:10   ` Andy Ng
@ 2015-01-21 13:13     ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2015-01-21 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Wednesday 21 January 2015 12:10:45 Andy Ng wrote:
> Thank you for your reply.
> It is during the kernel boot phase, and I just want to remove it with
> unregister mechanism.
> 

I don't think there is a way to solve your problem then.

	Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Unregisrtering a platform driver from another platform driver.
  2015-01-21 10:27 Unregisrtering a platform driver from another platform driver Andy Ng
  2015-01-21 11:15 ` Arnd Bergmann
@ 2015-01-21 13:49 ` Russell King - ARM Linux
  1 sibling, 0 replies; 5+ messages in thread
From: Russell King - ARM Linux @ 2015-01-21 13:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 21, 2015 at 10:27:35AM +0000, Andy Ng wrote:
> Dear Colleagues,
> 
> I would like to call "platform_driver_unregister" for a static module
> A from a static  module B.
> The static module A register its name  "physmap-flash".
> 
> Is there any kernel API to search and find the "physmap-flash" device,
> and then call unregistered with "platform_driver_unregister" from
> module B.

Why do you want to do this?  What is your motivation?

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-21 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 10:27 Unregisrtering a platform driver from another platform driver Andy Ng
2015-01-21 11:15 ` Arnd Bergmann
2015-01-21 12:10   ` Andy Ng
2015-01-21 13:13     ` Arnd Bergmann
2015-01-21 13:49 ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox