[SCSI] ses: fix problems caused by empty SES provided name
authorYinghai Lu <yinghai@kernel.org>
Fri, 1 May 2009 02:13:41 +0000 (19:13 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 15 May 2009 16:20:57 +0000 (12:20 -0400)
We use the name provided by SES to name objects.  An empty name is
legal in SES but causes problems in our generic device hierarchy.  Fix
this by falling back to a number if the name is either NULL or empty.

Also fix a secondary bug spotted in that dev_set_name(dev, name) uses
a string format and so would go wrong if name contained a '%'.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

No differences found