From: Jon Medhurst Date: Wed, 10 Oct 2012 12:27:25 +0000 (+0100) Subject: amba-clcd: Remove check for 'reg' value in clcdfb_probe X-Git-Tag: firefly_0821_release~3680^2~236^2^2~10^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=95c8041c5018e75c58968f0ca2251482fe6b22d6;p=firefly-linux-kernel-4.4.55.git amba-clcd: Remove check for 'reg' value in clcdfb_probe This check was attempting to ensure only one clcd device in the device-tree was probed, however the check fails in the valid case where the device is a child of another device and the 'reg' value is a offset from the start of that other device, not an absolute address. This occurs on vexpress with the motherboard clcd being a child of iofga. For now, we will just have to rely on there only being one display device specified in device-tree. Signed-off-by: Jon Medhurst --- diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 3cacf26f3e55..53af3d18a0c6 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -768,21 +768,6 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) #ifdef CONFIG_OF if (dev->dev.of_node) { - const __be32 *prop; - int len, na, ns; - phys_addr_t reg_base; - - na = of_n_addr_cells(dev->dev.of_node); - ns = of_n_size_cells(dev->dev.of_node); - - prop = of_get_property(dev->dev.of_node, "reg", &len); - if (WARN_ON(!prop || len < (na + ns) * sizeof(*prop))) - return -EINVAL; - reg_base = of_read_number(prop, na); - - if (dev->res.start != reg_base) - return -EINVAL; - if (!board) { board = kzalloc(sizeof(struct clcd_board), GFP_KERNEL); if (!board)