Re: [PATCH] drivers/hwmon: Use pr_fmt and pr_

Joe Perches
2010-10-20T19:59:07Z

On Wed, 2010-10-20 at 12:52 -0700, Joe Perches wrote:
> So perhaps add this to include/linux/hwmon.h instead:
> #if defined pr_fmt
> #undef pr_fmt
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> #endif

Nope. That won't work as other non-hwmon files include it.

drivers/platform/x86/eeepc-laptop.c:#include <linux/hwmon.h>
drivers/platform/x86/compal-laptop.c:#include <linux/hwmon.h>
drivers/platform/x86/thinkpad_acpi.c:#include <linux/hwmon.h>
drivers/thermal/thermal_sys.c:#include <linux/hwmon.h>
drivers/staging/iio/light/tsl2563.c:#include <linux/hwmon.h>
drivers/gpu/drm/radeon/radeon_pm.c:#include <linux/hwmon.h>
drivers/gpu/drm/nouveau/nouveau_pm.c:#include <linux/hwmon.h>
drivers/acpi/power_meter.c:#include <linux/hwmon.h>
drivers/input/touchscreen/ads7846.c:#include <linux/hwmon.h>