dmi: Introduce the dmi_get_bios_year() helper function
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 22 Feb 2018 12:59:20 +0000 (14:59 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 23 Feb 2018 07:20:30 +0000 (08:20 +0100)
commit492a1abd61e4b4f78c1c5804840a304a9e32da04
tree326e956e0e6b448dffa183819cd3b474126e3a31
parent24e8db62c135e142e23bec597adb135bd6a8828f
dmi: Introduce the dmi_get_bios_year() helper function

The pattern to only extract the year portion of date is used in
several places and more users may come.

By using this helper they may create slightly cleaner code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[ Minor stylistic cleanup. ]
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-acpi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Link: http://lkml.kernel.org/r/20180222125923.57385-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/dmi.h