From: Ian Abbott Date: Tue, 5 May 2015 17:47:25 +0000 (+0100) Subject: staging: comedi: gsc_hpdi: remove multiple board type support X-Git-Tag: omap-for-v4.2/fixes-rc1^2~92^2~651 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e899a4165cffe3aa802f813c624e90ce7ca23189;p=pandora-kernel.git 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-diff-tree failed