staging: ft1000: Fix coding style in ft1000_chkcard function.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a007e842af
commit
53cd3aa619
|
@ -1325,40 +1325,41 @@ Jim
|
||||||
// TRUE (device is present)
|
// TRUE (device is present)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
static int ft1000_chkcard (struct ft1000_device *dev) {
|
static int ft1000_chkcard(struct ft1000_device *dev)
|
||||||
u16 tempword;
|
{
|
||||||
u16 status;
|
u16 tempword;
|
||||||
|
u16 status;
|
||||||
struct ft1000_info *info = netdev_priv(dev->net);
|
struct ft1000_info *info = netdev_priv(dev->net);
|
||||||
|
|
||||||
if (info->fCondResetPend)
|
if (info->fCondResetPend) {
|
||||||
{
|
DEBUG
|
||||||
DEBUG("ft1000_hw:ft1000_chkcard:Card is being reset, return FALSE\n");
|
("ft1000_hw:ft1000_chkcard:Card is being reset, return FALSE\n");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
/* Mask register is used to check for device presence since it is never
|
||||||
// Mask register is used to check for device presence since it is never
|
* set to zero.
|
||||||
// set to zero.
|
*/
|
||||||
status = ft1000_read_register(dev, &tempword, FT1000_REG_SUP_IMASK);
|
status = ft1000_read_register(dev, &tempword, FT1000_REG_SUP_IMASK);
|
||||||
//DEBUG("ft1000_hw:ft1000_chkcard: read FT1000_REG_SUP_IMASK = %x\n", tempword);
|
//DEBUG("ft1000_hw:ft1000_chkcard: read FT1000_REG_SUP_IMASK = %x\n", tempword);
|
||||||
if (tempword == 0) {
|
if (tempword == 0) {
|
||||||
DEBUG("ft1000_hw:ft1000_chkcard: IMASK = 0 Card not detected\n");
|
DEBUG
|
||||||
return FALSE;
|
("ft1000_hw:ft1000_chkcard: IMASK = 0 Card not detected\n");
|
||||||
}
|
return FALSE;
|
||||||
|
}
|
||||||
// The system will return the value of 0xffff for the version register
|
/* The system will return the value of 0xffff for the version register
|
||||||
// if the device is not present.
|
* if the device is not present.
|
||||||
status = ft1000_read_register(dev, &tempword, FT1000_REG_ASIC_ID);
|
*/
|
||||||
//DEBUG("ft1000_hw:ft1000_chkcard: read FT1000_REG_ASIC_ID = %x\n", tempword);
|
status = ft1000_read_register(dev, &tempword, FT1000_REG_ASIC_ID);
|
||||||
if (tempword != 0x1b01 ){
|
//DEBUG("ft1000_hw:ft1000_chkcard: read FT1000_REG_ASIC_ID = %x\n", tempword);
|
||||||
dev->status |= FT1000_STATUS_CLOSING; //mbelian
|
if (tempword != 0x1b01) {
|
||||||
DEBUG("ft1000_hw:ft1000_chkcard: Version = 0xffff Card not detected\n");
|
dev->status |= FT1000_STATUS_CLOSING; //mbelian
|
||||||
return FALSE;
|
DEBUG
|
||||||
}
|
("ft1000_hw:ft1000_chkcard: Version = 0xffff Card not detected\n");
|
||||||
return TRUE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Function: ft1000_receive_cmd
|
// Function: ft1000_receive_cmd
|
||||||
|
|
Loading…
Reference in New Issue