Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316834
b: refs/heads/master
c: 73ec513
h: refs/heads/master
v: v3
  • Loading branch information
Venkatraman S authored and James Bottomley committed Jul 20, 2012
1 parent 642c3b5 commit 2681770
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17ccafc4ef00716d022cac9ff64cef0aafe7c02a
refs/heads/master: 73ec513a3b1fa89d3cbaf0bc7dcc3a2b67936f2a
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/ufs/ufshcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ static inline u32 ufshcd_get_ufs_version(struct ufs_hba *hba)
* the host controller
* @reg_hcs - host controller status register value
*
* Returns 0 if device present, non-zero if no device detected
* Returns 1 if device present, 0 if no device detected
*/
static inline int ufshcd_is_device_present(u32 reg_hcs)
{
return (DEVICE_PRESENT & reg_hcs) ? 0 : -1;
return (DEVICE_PRESENT & reg_hcs) ? 1 : 0;
}

/**
Expand Down Expand Up @@ -911,7 +911,7 @@ static int ufshcd_make_hba_operational(struct ufs_hba *hba)

/* check if device present */
reg = readl((hba->mmio_base + REG_CONTROLLER_STATUS));
if (ufshcd_is_device_present(reg)) {
if (!ufshcd_is_device_present(reg)) {
dev_err(&hba->pdev->dev, "cc: Device not present\n");
err = -ENXIO;
goto out;
Expand Down

0 comments on commit 2681770

Please sign in to comment.