Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927AbbG1Je4 (ORCPT ); Tue, 28 Jul 2015 05:34:56 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:34914 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbbG1Jey (ORCPT ); Tue, 28 Jul 2015 05:34:54 -0400 Date: Tue, 28 Jul 2015 10:34:49 +0100 From: Matt Fleming To: Guenter Roeck Cc: Wim Van Sebroeck , linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Mika Westerberg , Andy Shevchenko , Jean Delvare , Wolfram Sang , Matt Fleming , Linux I2C Subject: Re: [PATCH 2/5] i2c: i801: Create iTCO device on newer Intel PCHs Message-ID: <20150728093449.GE2492@codeblueprint.co.uk> References: <1438004292-16382-1-git-send-email-matt@codeblueprint.co.uk> <1438004292-16382-3-git-send-email-matt@codeblueprint.co.uk> <55B63B48.2040603@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55B63B48.2040603@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 43 On Mon, 27 Jul, at 07:08:08AM, Guenter Roeck wrote: > >@@ -113,6 +114,16 @@ > > #define SMBPCICTL 0x004 > > #define SMBPCISTS 0x006 > > #define SMBHSTCFG 0x040 > >+#define TCOBASE 0x050 > >+#define TCOCTL 0x054 > >+ > >+#define ACPIBASE 0x040 > >+#define ACPIBASE_SMI_OFF 0x030 > >+#define ACPICTRL 0x044 > >+#define ACPICTRL_EN BIT(7) > > If you use BIT, you should include bitops.h. > Not sure if that makes too much sense here, though, without converting > the rest of the driver to use BIT as well. OK, I'll just switch to the existing notation used throughout the driver rather than using bitops. > >+static void i801_del_tco(struct i801_priv *priv) > >+{ > >+ if (priv->tco_pdev) { > > platform_device_unregister() handles NULL pointers, so this if statement > is strictly speaking unnecessary. Good point, I'll remove this check since it makes the code simpler too. > >+ platform_device_unregister(priv->tco_pdev); > >+ priv->tco_pdev = NULL; > > Unnecessary; priv is going to be freed right afterwards. I'll drop this. -- Matt Fleming, Intel Open Source Technology Center -- 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/