9
0
Fork 0
Commit Graph

14 Commits

Author SHA1 Message Date
Sascha Hauer 2ca512e592 print out resource_size_t correctly
resource_size_t can be 32bit or 64bit depending on the architecture.
Add a define for it to be able to printf a resource_size_t correctly

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-25 14:45:43 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1fa17ad5d4 complete: add device name complete support for devinfo
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:37:34 +08:00
Sascha Hauer 2893952c28 devinfo: use accessor function for parameters
Instead of directly accessing the struct member of struct param_d
use the provided getter function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:18:32 +02:00
Sascha Hauer dbd4e1166e device: make singular devices possible
Currently all devices have an id meaning that all devicenames
end with a number. This patch adds a DEVICE_ID_SINGLE to make
it ppossible to register a device without an id assigned to
it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-15 16:11:26 +02:00
Sascha Hauer 33d1cc4bf2 commands: remove struct command pointer from commands
This is unused in all commands and thus can be removed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-27 20:28:07 +01:00
Sascha Hauer 491cc29b0a devices: unregister children when unregistering a device
We currently do not allow to unregister a device when it
has children. However, the return value is seldomly checked.
Also this breaks for hot pluggable devices like USB which we have
to unregister when they disappear. The best way to fix this is to
unregister our children and also the partitions on the unregistered
device.
We unregister the device first and then afterwards the children.
We do this because for example network devices have a miidev as
child which they unregister themselves. So we only have to
unregister the children which are not cleaned up by the drivers,
namely fs devices.
Also, unregister all partitions on a disappearing device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-17 10:27:15 +01:00
Sascha Hauer 18e845efd9 implement resource management for platform devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-04 22:26:12 +01:00
Sascha Hauer 79884012c6 devinfo: beautify output
Files associated to a device showed up in a long list. Instead,
print them in seperate lines and also show offset/size information

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-17 09:36:35 +02:00
Sascha Hauer 35191f24cc drivers/base: initialize active list
Otherwise, when a non active device is unregistered, we call
list_del on an unitialized list which oopses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 09:45:34 +02:00
Jean-Christophe PLAGNIOL-VILLARD ad7590ee64 driver: remove map_base
as now all the drivers and board have been switch to resource whe can drop
map_base and size from device_d

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-08-01 16:33:44 +08:00
Jean-Christophe PLAGNIOL-VILLARD aaefaddde3 devinfo: switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-29 14:04:24 +08:00
Jean-Christophe PLAGNIOL-VILLARD 7a68c0fac7 generic_memmap_ro/rw: switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-29 14:04:24 +08:00
Sascha Hauer ffcf536cef Merge branch 'pu' into next 2011-07-29 12:03:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD 85283965dc drivers/bus: move to drivers/base
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2011-07-21 13:44:04 +08:00