]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/target/target_core_spc.c
Merge remote-tracking branch 'asoc/topic/tlv320aic32x4' into asoc-next
[karo-tx-linux.git] / drivers / target / target_core_spc.c
index 0aa47babd16c61e2025b12a26443c3297da31c5a..2a91ed3ef3801ecea225c4c0cd5356a0bc500ec0 100644 (file)
@@ -997,7 +997,6 @@ static sense_reason_t spc_emulate_modesense(struct se_cmd *cmd)
        int length = 0;
        int ret;
        int i;
-       bool read_only = target_lun_is_rdonly(cmd);;
 
        memset(buf, 0, SE_MODE_PAGE_BUF);
 
@@ -1008,7 +1007,7 @@ static sense_reason_t spc_emulate_modesense(struct se_cmd *cmd)
        length = ten ? 3 : 2;
 
        /* DEVICE-SPECIFIC PARAMETER */
-       if ((cmd->se_lun->lun_access & TRANSPORT_LUNFLAGS_READ_ONLY) || read_only)
+       if (cmd->se_lun->lun_access_ro || target_lun_is_rdonly(cmd))
                spc_modesense_write_protect(&buf[length], type);
 
        /*