[PATCH 3/5] driver core: add SPDX identifiers to all driver core files

From: Greg Kroah-Hartman
Date: Tue Nov 07 2017 - 11:30:24 EST


It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the driver core files files with the correct SPDX license
identifier based on the license text in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Cc: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
Cc: William Breathitt Gray <vilhelm.gray@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx>
Cc: Philippe Ombredanne <pombredanne@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/base/attribute_container.c | 1 +
drivers/base/bus.c | 1 +
drivers/base/cacheinfo.c | 1 +
drivers/base/class.c | 1 +
drivers/base/component.c | 1 +
drivers/base/container.c | 1 +
drivers/base/core.c | 1 +
drivers/base/cpu.c | 1 +
drivers/base/dd.c | 1 +
drivers/base/devcoredump.c | 1 +
drivers/base/devres.c | 1 +
drivers/base/dma-contiguous.c | 1 +
drivers/base/dma-mapping.c | 1 +
drivers/base/driver.c | 1 +
drivers/base/firmware.c | 1 +
drivers/base/firmware_class.c | 1 +
drivers/base/hypervisor.c | 1 +
drivers/base/init.c | 1 +
drivers/base/isa.c | 1 +
drivers/base/map.c | 1 +
drivers/base/module.c | 1 +
drivers/base/pinctrl.c | 1 +
drivers/base/platform-msi.c | 1 +
drivers/base/platform.c | 1 +
drivers/base/property.c | 1 +
drivers/base/soc.c | 1 +
drivers/base/syscore.c | 1 +
drivers/base/test/test_async_driver_probe.c | 1 +
drivers/base/topology.c | 1 +
drivers/base/transport_class.c | 1 +
include/linux/device.h | 1 +
31 files changed, 31 insertions(+)

diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index 95e3ef82f3b7..218b9deb4f0b 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* attribute_container.c - implementation of a simple container for classes
*
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 22a64fd3309b..46ddb96b9179 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* bus.c - bus driver management
*
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index eb3af2739537..e321a7e66a1d 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* cacheinfo support - processor cache information via sysfs
*
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 52eb8e644acd..61220ea83f8e 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* class.c - basic device class management
*
diff --git a/drivers/base/component.c b/drivers/base/component.c
index 89b032f2ffd2..c96ed8068719 100644
--- a/drivers/base/component.c
+++ b/drivers/base/component.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Componentized device handling.
*
diff --git a/drivers/base/container.c b/drivers/base/container.c
index ecbfbe2e908f..ddc68a1e10af 100644
--- a/drivers/base/container.c
+++ b/drivers/base/container.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* System bus type for containers.
*
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 2e683cdf4a08..d9d1012e4979 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/base/core.c - core driver model code (device registration, etc)
*
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 321cd7b4d817..3f55af003f12 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* CPU subsystem support
*/
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index ad44b40fe284..5632382b1095 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/base/dd.c - The core device/driver interactions.
*
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c
index 7be310f7db73..3133684a8754 100644
--- a/drivers/base/devcoredump.c
+++ b/drivers/base/devcoredump.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* This file is provided under the GPLv2 license.
*
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index 71d577025285..1b7a9a8cbd6a 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/base/devres.c - device resource management
*
diff --git a/drivers/base/dma-contiguous.c b/drivers/base/dma-contiguous.c
index ea9726e71468..7c954100d503 100644
--- a/drivers/base/dma-contiguous.c
+++ b/drivers/base/dma-contiguous.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Contiguous Memory Allocator for DMA mapping framework
* Copyright (c) 2010-2011 by Samsung Electronics.
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
index e584eddef0a7..c7e7806a657f 100644
--- a/drivers/base/dma-mapping.c
+++ b/drivers/base/dma-mapping.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* drivers/base/dma-mapping.c - arch-independent dma-mapping routines
*
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 4eabfe28d2b3..6a93c7522dbe 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* driver.c - centralized device driver management
*
diff --git a/drivers/base/firmware.c b/drivers/base/firmware.c
index 113815556809..0ef2a36de65e 100644
--- a/drivers/base/firmware.c
+++ b/drivers/base/firmware.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* firmware.c - firmware subsystem hoohaw.
*
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 4b57cf5bc81d..b82d6a4759c3 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* firmware_class.c - Multi purpose firmware loading support
*
diff --git a/drivers/base/hypervisor.c b/drivers/base/hypervisor.c
index 4f8b741f4615..8dbd98c7ed55 100644
--- a/drivers/base/hypervisor.c
+++ b/drivers/base/hypervisor.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* hypervisor.c - /sys/hypervisor subsystem.
*
diff --git a/drivers/base/init.c b/drivers/base/init.c
index 48c0e220acc0..0bf84b9e09b2 100644
--- a/drivers/base/init.c
+++ b/drivers/base/init.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2002-3 Patrick Mochel
* Copyright (c) 2002-3 Open Source Development Labs
diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index cd6ccdcf9df0..61ab202aae43 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* ISA bus.
*/
diff --git a/drivers/base/map.c b/drivers/base/map.c
index c1d38234d725..07daaf6c2cd6 100644
--- a/drivers/base/map.c
+++ b/drivers/base/map.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* linux/drivers/base/map.c
*
diff --git a/drivers/base/module.c b/drivers/base/module.c
index 2a215780eda2..9e50e55c547a 100644
--- a/drivers/base/module.c
+++ b/drivers/base/module.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* module.c - module sysfs fun for drivers
*
diff --git a/drivers/base/pinctrl.c b/drivers/base/pinctrl.c
index eb929dd6ef1e..fec06a1a0e15 100644
--- a/drivers/base/pinctrl.c
+++ b/drivers/base/pinctrl.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Driver core interface to the pinctrl subsystem.
*
diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c
index e5473525e7b2..d7c56d5b06e0 100644
--- a/drivers/base/platform-msi.c
+++ b/drivers/base/platform-msi.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* MSI framework for platform devices
*
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 9045c5f3734e..99c21ba54d28 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* platform.c - platform 'pseudo' bus for legacy devices
*
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 7ed99c1b2a8b..f74ad3253a6c 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* property.c - Unified device property interface.
*
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index 909dedae4c4e..b1e6e7ca46f0 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) ST-Ericsson SA 2011
*
diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c
index 8d98a329f6ea..34f71a46b51c 100644
--- a/drivers/base/syscore.c
+++ b/drivers/base/syscore.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* syscore.c - Execution of system core operations.
*
diff --git a/drivers/base/test/test_async_driver_probe.c b/drivers/base/test/test_async_driver_probe.c
index a3355d66bc12..58b445ed8d8b 100644
--- a/drivers/base/test/test_async_driver_probe.c
+++ b/drivers/base/test/test_async_driver_probe.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2014 Google, Inc.
*
diff --git a/drivers/base/topology.c b/drivers/base/topology.c
index d936fcf9f1fb..5abc176a2966 100644
--- a/drivers/base/topology.c
+++ b/drivers/base/topology.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* driver/base/topology.c - Populate sysfs with cpu topology information
*
diff --git a/drivers/base/transport_class.c b/drivers/base/transport_class.c
index f6c453c3816e..750378341a43 100644
--- a/drivers/base/transport_class.c
+++ b/drivers/base/transport_class.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* transport_class.c - implementation of generic transport classes
* using attribute_containers
diff --git a/include/linux/device.h b/include/linux/device.h
index 66fe271c2544..6e6e8ed2bbb1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* device.h - generic, centralized driver model
*
--
2.15.0