lkml.org 
[lkml]   [2015]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] i2c: i801: Create iTCO device on newer Intel PCHs
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


\
 
 \ /
  Last update: 2015-07-28 11:41    [W:0.127 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site