Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751289AbbLTVFo (ORCPT ); Sun, 20 Dec 2015 16:05:44 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:60010 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbbLTVFQ (ORCPT ); Sun, 20 Dec 2015 16:05:16 -0500 From: Guenter Roeck To: linux-watchdog@vger.kernel.org Cc: Wim Van Sebroeck , Pratyush Anand , Hans de Goede , Damien Riegel , linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH 3/5] watchdog: da9052_wdt: Drop reference counting Date: Sun, 20 Dec 2015 13:05:01 -0800 Message-Id: <1450645503-16661-4-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1450645503-16661-1-git-send-email-linux@roeck-us.net> References: <1450645503-16661-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2481 Lines: 86 Reference counting is now implemented in the watchdog core and no longer required in watchdog drivers. Signed-off-by: Guenter Roeck --- drivers/watchdog/da9052_wdt.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c index 67e67977bd29..2fc19a32a320 100644 --- a/drivers/watchdog/da9052_wdt.c +++ b/drivers/watchdog/da9052_wdt.c @@ -31,7 +31,6 @@ struct da9052_wdt_data { struct watchdog_device wdt; struct da9052 *da9052; - struct kref kref; unsigned long jpast; }; @@ -51,10 +50,6 @@ static const struct { }; -static void da9052_wdt_release_resources(struct kref *r) -{ -} - static int da9052_wdt_set_timeout(struct watchdog_device *wdt_dev, unsigned int timeout) { @@ -104,20 +99,6 @@ static int da9052_wdt_set_timeout(struct watchdog_device *wdt_dev, return 0; } -static void da9052_wdt_ref(struct watchdog_device *wdt_dev) -{ - struct da9052_wdt_data *driver_data = watchdog_get_drvdata(wdt_dev); - - kref_get(&driver_data->kref); -} - -static void da9052_wdt_unref(struct watchdog_device *wdt_dev) -{ - struct da9052_wdt_data *driver_data = watchdog_get_drvdata(wdt_dev); - - kref_put(&driver_data->kref, da9052_wdt_release_resources); -} - static int da9052_wdt_start(struct watchdog_device *wdt_dev) { return da9052_wdt_set_timeout(wdt_dev, wdt_dev->timeout); @@ -170,8 +151,6 @@ static const struct watchdog_ops da9052_wdt_ops = { .stop = da9052_wdt_stop, .ping = da9052_wdt_ping, .set_timeout = da9052_wdt_set_timeout, - .ref = da9052_wdt_ref, - .unref = da9052_wdt_unref, }; @@ -198,8 +177,6 @@ static int da9052_wdt_probe(struct platform_device *pdev) da9052_wdt->parent = &pdev->dev; watchdog_set_drvdata(da9052_wdt, driver_data); - kref_init(&driver_data->kref); - ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, DA9052_CONTROLD_TWDSCALE, 0); if (ret < 0) { @@ -225,7 +202,6 @@ static int da9052_wdt_remove(struct platform_device *pdev) struct da9052_wdt_data *driver_data = platform_get_drvdata(pdev); watchdog_unregister_device(&driver_data->wdt); - kref_put(&driver_data->kref, da9052_wdt_release_resources); return 0; } -- 2.1.4 -- 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/