driver core: device_get_devnode() should take a const *
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jan 2023 11:30:09 +0000 (12:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jan 2023 12:45:40 +0000 (13:45 +0100)
commit42bb5be8936f40a1d0e618766645e7fd0cbfe591
treea57c5dbf52f58ff6ca319e90c2555ba9b998978a
parenta9b12f8b4e3309c4c25d39e7ab818943b9c48c1c
driver core: device_get_devnode() should take a const *

device_get_devnode() should take a constant * to struct device as it
does not modify it in any way, so modify the function definition to do
this and move it out of device.h as it does not need to be exposed to
the whole kernel tree.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Won Chung <wonchung@google.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230111113018.459199-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/base.h
drivers/base/core.c
include/linux/device.h