Re: [patch v9 3/4] platform/mellanox: mlxreg-hotplug: Code cleanup

From: Darren Hart
Date: Mon Jan 22 2018 - 23:03:28 EST


On Wed, Jan 17, 2018 at 06:21:55PM +0000, Vadim Pasternak wrote:
> Removing unnecessary includes.
...
> diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
> index 2866c76..556e612 100644
> --- a/drivers/platform/mellanox/mlxreg-hotplug.c
> +++ b/drivers/platform/mellanox/mlxreg-hotplug.c
> @@ -41,8 +41,6 @@
> #include <linux/module.h>
> #include <linux/platform_data/mlxreg.h>
> #include <linux/platform_device.h>
> -#include <linux/spinlock.h>

But spinlock IS required. Just because some other include eventually also
includes it doesn't meet we can drop it here. We use functions defined in
spinlock.h, so it needs to be included.

I've updated this in my branch...

--
Darren Hart
VMware Open Source Technology Center