From e899a4165cffe3aa802f813c624e90ce7ca23189 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 5 May 2015 18:47:25 +0100 Subject: [PATCH] staging: comedi: gsc_hpdi: remove multiple board type support The code for determining which board type matches the PCI device ID is over-the-top since only a single board type is supported. Also, the method it uses match the PCI device ID to a board type is a little antiquated. Most comedi drivers for PCI devices use `driver_data` from the probed PCI device as an index into an array of supported board types, but "gsc_hpdi" uses a `for` loop to find an element of `hpdi_boards[]` that matches the PCI device. The only thing in `hpdi_boards[]` not used for finding a matching PCI device is the `name` member of `struct hpdi_board` which points to a string literal and ends up getting assigned to `dev->board_name`. Get rid of the multiple board type support, and set `dev->board_name` to point to the original string literal pointed to by `hpdi_boards[0].name`. This string is visible to userspace. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed