Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037AbbHRQpu (ORCPT ); Tue, 18 Aug 2015 12:45:50 -0400 Received: from mail-bn1on0115.outbound.protection.outlook.com ([157.56.110.115]:21344 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753537AbbHRQps convert rfc822-to-8bit (ORCPT ); Tue, 18 Aug 2015 12:45:48 -0400 From: Hartley Sweeten To: Pratyush Anand , "linux@roeck-us.net" CC: Krzysztof Kozlowski , "open list:WOLFSON MICROELECTRONICS DRIVERS" , "open list:ARM/STI ARCHITECTURE" , Linus Walleij , Baruch Siach , "open list:INTEL MANAGEMENT ENGINE mei" , "Wim Van Sebroeck" , Thierry Reding , Alexandre Courbot , "moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES" , Lee Jones , Kukjin Kim , Tomas Winkler , "linux-watchdog@vger.kernel.org" , Stephen Warren , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , "open list:TEGRA ARCHITECTURE SUPPORT" , "moderated list:ARM/U300 MACHINE SUPPORT" , Maxime Coquelin , Barry Song , Johannes Thumshirn , Support Opensource , Andreas Werner , Srinivas Kandagatla , Patrice Chotard Subject: RE: [PATCH V2] Watchdog: Fix parent of watchdog_devices Thread-Topic: [PATCH V2] Watchdog: Fix parent of watchdog_devices Thread-Index: AQHQ2dTCl+o9d2z1ZEuXWOBkjYCr0p4R9btg Date: Tue, 18 Aug 2015 16:45:44 +0000 Message-ID: References: <9fcc2a2cc8273f461baa13c6c9992f3ca56b508a.1439915117.git.panand@redhat.com> In-Reply-To: <9fcc2a2cc8273f461baa13c6c9992f3ca56b508a.1439915117.git.panand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=HartleyS@visionengravers.com; x-originating-ip: [184.183.19.121] x-microsoft-exchange-diagnostics: 1;BN3PR0101MB1060;5:VX9srtrj36N3kK9l4uLLcys3l06bTYzmlY1Xok/HsVyy2ecyhKo+shO/bla+ey+9t63e4h2inTMrGbsi+phRJDzk0aQBQs2evA6dpJ8HvzmJ1MOk/h8ydR4wNsJ9XvCg79M/rIAqD3XeXeGkbG515w==;24:qqkdKsnQZls0kI9ZhQQLOcMi0gIO2qy1r+jSQ82mauoI6KARu3im4FajCS7ktmi35VOXDHMITENJpuKDRmlGjJ+2XMTxDUK09Mg4Dby/N9E=;20:cR4DAXb2sDjTCmyCjLoIGm1HPaSqYHc6icyE19vGwq7D7Wayew91blmFpgRA6nuJJ0qe6CGtkkCaStY/3ebGwg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0101MB1060; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8121501046)(5005006)(3002001);SRVR:BN3PR0101MB1060;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0101MB1060; x-forefront-prvs: 067270ECAF x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(24454002)(164054003)(189002)(377454003)(199003)(19580405001)(5001960100002)(77156002)(97736004)(54356999)(2900100001)(64706001)(2501003)(106356001)(10400500002)(66066001)(62966003)(87936001)(77096005)(2950100001)(5001860100001)(105586002)(81156007)(80792005)(101416001)(5001830100001)(68736005)(76176999)(102836002)(50986999)(4001540100001)(5002640100001)(189998001)(92566002)(122556002)(46102003)(106116001)(5003600100002)(5001770100001)(86362001)(2656002)(19580395003)(74316001)(33656002)(40100003);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0101MB1060;H:BN3PR0101MB1057.prod.exchangelabs.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: visionengravers.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2015 16:45:44.4871 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d698601f-af92-4269-8099-fd6f11636477 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0101MB1060 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1626 Lines: 45 On Tuesday, August 18, 2015 9:34 AM, Pratyush Anand wrote: > > /sys/class/watchdog/watchdogn/device/modalias can help to identify the > driver/module for a given watchdog node. However, many wdt devices does not set > its parent and so, we do not see an entry for device in sysfs for such devices. > > This patch fixes parent of watchdog_device so that > /sys/class/watchdog/watchdogn/device is populated. > > Exceptions: booke, diag288, mpc8xxx, octeon, softdog and w83627hf -- They do not > have any parent. Not sure, how we can we identify driver for these devices. > > Signed-off-by: Pratyush Anand > --- [snip] drivers/watchdog/ep93xx_wdt.c | 1 + [snip] diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 7a2cc7191c58..0a4d7cc05d54 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c @@ -132,6 +132,7 @@ static int ep93xx_wdt_probe(struct platform_device *pdev) val = readl(mmio_base + EP93XX_WATCHDOG); ep93xx_wdt_wdd.bootstatus = (val & 0x01) ? WDIOF_CARDRESET : 0; ep93xx_wdt_wdd.timeout = timeout; + ep93xx_wdt_wdd.parent = &pdev->dev; watchdog_set_nowayout(&ep93xx_wdt_wdd, nowayout); For ep93xx_wdt.c, use whichever tag you prefer: Reviewed-by: H Hartley Sweeten Acked-by: H Hartley Sweeten Thanks, Hartley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/