staging: dgap: Fixed sparse error: same symbol redeclared with different type

sparse reported dgap_do_fep_load is redeclared with different type. while
fixing, I noticed __user attribute is used incorrectly in declaration.
There is no need to define __user for firware->data.

Replaced the __user with 'const uchar *' from function dgap_do_fep_load and
did the same for function dgap_do_bios_load

patch generated against: next-20140318

Signed-off-by: Masood Mehmood <ody.guru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Masood Mehmood 2014-03-18 13:40:14 -07:00 committed by Greg Kroah-Hartman
parent a3acc83a4a
commit fd54889b65
1 changed files with 6 additions and 7 deletions

View File

@ -210,9 +210,8 @@ static uint dgap_config_get_useintr(struct board_t *bd);
static uint dgap_config_get_altpin(struct board_t *bd); static uint dgap_config_get_altpin(struct board_t *bd);
static int dgap_ms_sleep(ulong ms); static int dgap_ms_sleep(ulong ms);
static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len);
int len); static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len);
static void dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len);
#ifdef DIGI_CONCENTRATORS_SUPPORTED #ifdef DIGI_CONCENTRATORS_SUPPORTED
static void dgap_do_conc_load(struct board_t *brd, uchar *uaddr, int len); static void dgap_do_conc_load(struct board_t *brd, uchar *uaddr, int len);
#endif #endif
@ -923,7 +922,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].bios_name); fw_info[card_type].bios_name);
return ret; return ret;
} }
dgap_do_bios_load(brd, (char *)fw->data, fw->size); dgap_do_bios_load(brd, fw->data, fw->size);
release_firmware(fw); release_firmware(fw);
/* Wait for BIOS to test board... */ /* Wait for BIOS to test board... */
@ -939,7 +938,7 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
fw_info[card_type].fep_name); fw_info[card_type].fep_name);
return ret; return ret;
} }
dgap_do_fep_load(brd, (char *)fw->data, fw->size); dgap_do_fep_load(brd, fw->data, fw->size);
release_firmware(fw); release_firmware(fw);
/* Wait for FEP to load on board... */ /* Wait for FEP to load on board... */
@ -4335,7 +4334,7 @@ static int dgap_tty_register_ports(struct board_t *brd)
* Copies the BIOS code from the user to the board, * Copies the BIOS code from the user to the board,
* and starts the BIOS running. * and starts the BIOS running.
*/ */
static void dgap_do_bios_load(struct board_t *brd, uchar __user *ubios, int len) static void dgap_do_bios_load(struct board_t *brd, const uchar *ubios, int len)
{ {
uchar *addr; uchar *addr;
uint offset; uint offset;
@ -4412,7 +4411,7 @@ static int dgap_do_wait_for_bios(struct board_t *brd)
* Copies the FEP code from the user to the board, * Copies the FEP code from the user to the board,
* and starts the FEP running. * and starts the FEP running.
*/ */
static void dgap_do_fep_load(struct board_t *brd, uchar __user *ufep, int len) static void dgap_do_fep_load(struct board_t *brd, const uchar *ufep, int len)
{ {
uchar *addr; uchar *addr;
uint offset; uint offset;