From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752923AbbFGRB0 (ORCPT ); Sun, 7 Jun 2015 13:01:26 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:35918 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752328AbbFGQ7g (ORCPT ); Sun, 7 Jun 2015 12:59:36 -0400 From: Grant Likely To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Grant Likely , Pantelis Antoniou , Wolfram Sang , Rob Herring , Greg Kroah-Hartman , Ricardo Ribalda Delgado Subject: [PATCH 1/2] of/unittest: Show broken behaviour in the platform bus Date: Sun, 7 Jun 2015 15:20:10 +0100 Message-Id: <1433686811-12303-2-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433686811-12303-1-git-send-email-grant.likely@linaro.org> References: <1433686811-12303-1-git-send-email-grant.likely@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a single resource to the test bus device to exercise the platform bus code a little more. This isn't strictly a devicetree test, but it is a corner case that the devicetree runs into. Until we've got platform device unittests, it can live here. It doesn't need to be an explicit text because the kernel will oops when it is wrong. Cc: Pantelis Antoniou Cc: Wolfram Sang Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Ricardo Ribalda Delgado Signed-off-by: Grant Likely --- drivers/of/unittest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 18016341d5a9..0a27b38c3041 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -753,6 +753,11 @@ static void __init of_unittest_match_node(void) } } +static struct resource test_bus_res = { + .start = 0xfffffff8, + .end = 0xfffffff9, + .flags = IORESOURCE_MEM, +}; static const struct platform_device_info test_bus_info = { .name = "unittest-bus", }; @@ -795,6 +800,7 @@ static void __init of_unittest_platform_populate(void) if (rc) return; test_bus->dev.of_node = np; + platform_device_add_resources(test_bus, &test_bus_res, 1); of_platform_populate(np, match, NULL, &test_bus->dev); for_each_child_of_node(np, child) { -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: [PATCH 1/2] of/unittest: Show broken behaviour in the platform bus Date: Sun, 7 Jun 2015 15:20:10 +0100 Message-ID: <1433686811-12303-2-git-send-email-grant.likely@linaro.org> References: <1433686811-12303-1-git-send-email-grant.likely@linaro.org> Return-path: In-Reply-To: <1433686811-12303-1-git-send-email-grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Grant Likely , Pantelis Antoniou , Wolfram Sang , Rob Herring , Greg Kroah-Hartman , Ricardo Ribalda Delgado List-Id: devicetree@vger.kernel.org Add a single resource to the test bus device to exercise the platform bus code a little more. This isn't strictly a devicetree test, but it is a corner case that the devicetree runs into. Until we've got platform device unittests, it can live here. It doesn't need to be an explicit text because the kernel will oops when it is wrong. Cc: Pantelis Antoniou Cc: Wolfram Sang Cc: Rob Herring Cc: Greg Kroah-Hartman Cc: Ricardo Ribalda Delgado Signed-off-by: Grant Likely --- drivers/of/unittest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 18016341d5a9..0a27b38c3041 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -753,6 +753,11 @@ static void __init of_unittest_match_node(void) } } +static struct resource test_bus_res = { + .start = 0xfffffff8, + .end = 0xfffffff9, + .flags = IORESOURCE_MEM, +}; static const struct platform_device_info test_bus_info = { .name = "unittest-bus", }; @@ -795,6 +800,7 @@ static void __init of_unittest_platform_populate(void) if (rc) return; test_bus->dev.of_node = np; + platform_device_add_resources(test_bus, &test_bus_res, 1); of_platform_populate(np, match, NULL, &test_bus->dev); for_each_child_of_node(np, child) { -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html