All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] Convert SES to use scsi_get_vpd_page
@ 2008-06-23 15:18 Matthew Wilcox
  0 siblings, 0 replies; only message in thread
From: Matthew Wilcox @ 2008-06-23 15:18 UTC (permalink / raw)
  To: linux-scsi


SES had its own code to retrieve VPD from devices; convert it to use the
new scsi_get_vpd_page helper.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 45df83b..351bce7 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -356,21 +356,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,
 	struct efd efd = {
 		.addr = 0,
 	};
-	unsigned char cmd[] = {
-		INQUIRY,
-		1,
-		0x83,
-		VPD_INQUIRY_SIZE >> 8,
-		VPD_INQUIRY_SIZE & 0xff,
-		0
-	};
-
-	if (!buf)
-		return;
-
-	if (scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf,
-			     VPD_INQUIRY_SIZE, NULL, SES_TIMEOUT, SES_RETRIES))
-		goto free;
+	scsi_get_vpd_page(sdev, buf, 0x83, VPD_INQUIRY_SIZE);
 
 	len = (buf[2] << 8) + buf[3];
 	desc = buf + 4;
-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-23 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-23 15:18 [PATCH 4/4] Convert SES to use scsi_get_vpd_page Matthew Wilcox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.