Skip to content

Commit

Permalink
[PATCH] ps3: add shutdown to virtual uart port driver framework
Browse files Browse the repository at this point in the history
PS3: Add a shutdown method to the PS3's virtual uart port driver framework

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed Feb 12, 2007
1 parent 5e14ab8 commit 5b8e8ee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions drivers/ps3/vuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,22 @@ static int ps3_vuart_remove(struct device *_dev)
return 0;
}

static void ps3_vuart_shutdown(struct device *_dev)
{
struct ps3_vuart_port_device *dev = to_ps3_vuart_port_device(_dev);
struct ps3_vuart_port_driver *drv =
to_ps3_vuart_port_driver(_dev->driver);

dev_dbg(&dev->core, "%s:%d: %s\n", __func__, __LINE__,
dev->core.bus_id);

if (drv->shutdown)
drv->shutdown(dev);
else
dev_dbg(&dev->core, "%s:%d: %s no shutdown method\n", __func__,
__LINE__, dev->core.bus_id);
}

/**
* ps3_vuart - The vuart instance.
*
Expand All @@ -878,6 +894,7 @@ struct bus_type ps3_vuart = {
.match = ps3_vuart_match,
.probe = ps3_vuart_probe,
.remove = ps3_vuart_remove,
.shutdown = ps3_vuart_shutdown,
};

int __init ps3_vuart_init(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/ps3/vuart.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct ps3_vuart_port_driver {
struct device_driver core;
int (*probe)(struct ps3_vuart_port_device *);
int (*remove)(struct ps3_vuart_port_device *);
void (*shutdown)(struct ps3_vuart_port_device *);
int (*tx_event)(struct ps3_vuart_port_device *dev);
int (*rx_event)(struct ps3_vuart_port_device *dev);
int (*disconnect_event)(struct ps3_vuart_port_device *dev);
Expand Down

0 comments on commit 5b8e8ee

Please sign in to comment.