scsi_sysfs: call 'device_add' after attaching device handler
'device_add' will be evaluating the 'is_visible' callback when creating the sysfs attributes. As by this time the device handler has not been attached the 'access_state' attribute will never be visible. This patch moves the code around so that the device handler is present by the time 'is_visible' is evaluated to correctly display the 'access_state' attribute. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NBart van Assche <bart.vanassche@sandisk.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Showing
想要评论请 注册 或 登录