]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/s390/cio/chp.h
[S390] cio: add lock to struct channel_path
[karo-tx-linux.git] / drivers / s390 / cio / chp.h
index 26c3d22461764b56630958bbbfa6cb9714b166b0..695ec20f1c598f22ee560f03f6fd647bc2cdcbad 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/chp.h
  *
- *    Copyright IBM Corp. 2007
+ *    Copyright IBM Corp. 2007,2010
  *    Author(s): Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
  */
 
@@ -10,6 +10,7 @@
 
 #include <linux/types.h>
 #include <linux/device.h>
+#include <linux/mutex.h>
 #include <asm/chpid.h>
 #include "chsc.h"
 #include "css.h"
@@ -40,14 +41,15 @@ static inline int chp_test_bit(u8 *bitmap, int num)
 
 
 struct channel_path {
+       struct device dev;
        struct chp_id chpid;
+       struct mutex lock; /* Serialize access to below members. */
        int state;
        struct channel_path_desc desc;
        /* Channel-measurement related stuff: */
        int cmg;
        int shared;
        void *cmg_chars;
-       struct device dev;
 };
 
 int chp_get_status(struct chp_id chpid);