From patchwork Fri Jan 22 12:32:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12039313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19A5EC433E6 for ; Fri, 22 Jan 2021 12:35:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9F8A23437 for ; Fri, 22 Jan 2021 12:35:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728176AbhAVMfg (ORCPT ); Fri, 22 Jan 2021 07:35:36 -0500 Received: from mga14.intel.com ([192.55.52.115]:29472 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728159AbhAVMek (ORCPT ); Fri, 22 Jan 2021 07:34:40 -0500 IronPort-SDR: IM2ELx6Ijke34ySPI0Qmfn8qV7zd8S2C81VH+rGGffFb/mWCTE473sEFcC6Ut/iWBHAOYLb2dO Nowr2KOHTMHQ== X-IronPort-AV: E=McAfee;i="6000,8403,9871"; a="178661020" X-IronPort-AV: E=Sophos;i="5.79,366,1602572400"; d="scan'208";a="178661020" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2021 04:32:10 -0800 IronPort-SDR: Wh3rkhMZP+YbZBcmjyEVRU8Txx6FDyJbuPNdBg7uhBs7dltk1l2P+qib5BV6QU8uE6n+/2zpk4 V46bSMzUWypg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,366,1602572400"; d="scan'208";a="355224168" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 22 Jan 2021 04:32:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E5BB629A; Fri, 22 Jan 2021 14:32:02 +0200 (EET) From: Andy Shevchenko To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , platform-driver-x86@vger.kernel.org, Mark Gross , linux-watchdog@vger.kernel.org, Wim Van Sebroeck , Guenter Roeck Cc: Andy Shevchenko , Hans de Goede , Linus Walleij Subject: [PATCH v1 4/5] platform/x86: intel_scu_wdt: Drop SCU notification Date: Fri, 22 Jan 2021 14:32:00 +0200 Message-Id: <20210122123201.40935-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210122123201.40935-1-andriy.shevchenko@linux.intel.com> References: <20210122123201.40935-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Since SCU code along with the Intel MID watchdog driver has been refactored in a way that latter will be probed only after the former has been come to live, the notification code is bogus and not needed. Remove it for good. Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Acked-by: Linus Walleij Reviewed-by: Guenter Roeck --- drivers/platform/x86/intel_scu_wdt.c | 31 +++++++--------------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/drivers/platform/x86/intel_scu_wdt.c b/drivers/platform/x86/intel_scu_wdt.c index 227218a8f98e..19f7686a3c19 100644 --- a/drivers/platform/x86/intel_scu_wdt.c +++ b/drivers/platform/x86/intel_scu_wdt.c @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -49,34 +48,18 @@ static struct intel_mid_wdt_pdata tangier_pdata = { .probe = tangier_probe, }; -static int wdt_scu_status_change(struct notifier_block *nb, - unsigned long code, void *data) -{ - if (code == SCU_DOWN) { - platform_device_unregister(&wdt_dev); - return 0; - } - - return platform_device_register(&wdt_dev); -} - -static struct notifier_block wdt_scu_notifier = { - .notifier_call = wdt_scu_status_change, -}; - static int __init register_mid_wdt(void) { if (intel_mid_identify_cpu() != INTEL_MID_CPU_CHIP_TANGIER) return -ENODEV; wdt_dev.dev.platform_data = &tangier_pdata; - - /* - * We need to be sure that the SCU IPC is ready before watchdog device - * can be registered: - */ - intel_scu_notifier_add(&wdt_scu_notifier); - - return 0; + return platform_device_register(&wdt_dev); } arch_initcall(register_mid_wdt); + +static void __exit unregister_mid_wdt(void) +{ + platform_device_unregister(&wdt_dev); +} +__exitcall(unregister_mid_wdt);