[PATCH] platform driver: Drop check for resource conflicts

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Oct 10 06:57:43 EDT 2012


On 11:44 Wed 10 Oct     , Sascha Hauer wrote:
> The check is wrong since it would have to check whether the
> new iomem region overlaps with an existing region. Checking
> for the base address only is not enough.
> Currently this is not possible because every device conflicts
> with the top iomem region which covers the whole address space.
> 
> This at least fixes the regression that devices whose memory region
> begins at 0x0 can no longer be succesfully registered.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Alexander Shiyan <shc_work at mail.ru>
> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> ---
>  drivers/base/platform.c |   12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 13b4620..ea4e37b 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -66,18 +66,6 @@ int platform_device_register(struct device_d *new_device)
>  {
>  	new_device->bus = &platform_bus;
>  
> -	if (new_device->resource) {
> -		struct device_d *dev;
> -
> -		bus_for_each_device(new_device->bus, dev) {
> -			if (!dev->resource)
> -				continue;
> -			if (dev->resource->start == new_device->resource->start) {
> -				return -EBUSY;
> -			}
> -		}
> -	}
> -
IIRC this break the dt probe no?

this break the arm and st hw atleast

Best Regards,
J.



More information about the barebox mailing list