Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361407
b: refs/heads/master
c: 93481c9
h: refs/heads/master
i:
  361405: 13bb093
  361403: f23ec94
  361399: 6f17b07
  361391: b3c3a47
  361375: 5fc3e26
  361343: c72b06c
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Mar 7, 2013
1 parent d567c57 commit b1b5ce9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8360cb5f389ebd36b708978e0f776a285a2deb5a
refs/heads/master: 93481c90200c50c7874b6a773acc87095ee3907d
4 changes: 3 additions & 1 deletion trunk/arch/s390/include/asm/eadm.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ struct scm_device {
#define OP_STATE_TEMP_ERR 2
#define OP_STATE_PERM_ERR 3

enum scm_event {SCM_CHANGE};

struct scm_driver {
struct device_driver drv;
int (*probe) (struct scm_device *scmdev);
int (*remove) (struct scm_device *scmdev);
void (*notify) (struct scm_device *scmdev);
void (*notify) (struct scm_device *scmdev, enum scm_event event);
void (*handler) (struct scm_device *scmdev, void *data, int error);
};

Expand Down
16 changes: 10 additions & 6 deletions trunk/drivers/s390/block/scm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
#include <asm/eadm.h>
#include "scm_blk.h"

static void notify(struct scm_device *scmdev)
static void scm_notify(struct scm_device *scmdev, enum scm_event event)
{
pr_info("%lu: The capabilities of the SCM increment changed\n",
(unsigned long) scmdev->address);
SCM_LOG(2, "State changed");
SCM_LOG_STATE(2, scmdev);
switch (event) {
case SCM_CHANGE:
pr_info("%lu: The capabilities of the SCM increment changed\n",
(unsigned long) scmdev->address);
SCM_LOG(2, "State changed");
SCM_LOG_STATE(2, scmdev);
break;
}
}

static int scm_probe(struct scm_device *scmdev)
Expand Down Expand Up @@ -64,7 +68,7 @@ static struct scm_driver scm_drv = {
.name = "scm_block",
.owner = THIS_MODULE,
},
.notify = notify,
.notify = scm_notify,
.probe = scm_probe,
.remove = scm_remove,
.handler = scm_blk_irq,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static void scmdev_update(struct scm_device *scmdev, struct sale *sale)
goto out;
scmdrv = to_scm_drv(scmdev->dev.driver);
if (changed && scmdrv->notify)
scmdrv->notify(scmdev);
scmdrv->notify(scmdev, SCM_CHANGE);
out:
device_unlock(&scmdev->dev);
if (changed)
Expand Down

0 comments on commit b1b5ce9

Please sign in to comment.