auxdisplay: linedisp: Use unique number for id
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 12 Feb 2024 17:01:36 +0000 (19:01 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 15 Feb 2024 11:31:12 +0000 (13:31 +0200)
commit50d6b9d56e69563d3b261ee25bc644c59c5bff58
tree9bf0f919315adb02c61dca792cebc7c6582a6b03
parent2327960f0c5ecd7a285e69284b6ec3fdbd2757be
auxdisplay: linedisp: Use unique number for id

The absence of decrementation of linedisp_id is incorrect in two ways,
i.e. it may cause:
- an ID exhaustion
- (and if the above is addressed) a duplicate id number may be allocated
  next time a device is added

Replace above mentioned approach by using IDA framework.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/auxdisplay/line-display.c
drivers/auxdisplay/line-display.h