summaryrefslogtreecommitdiffstats
path: root/fs/tftp.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-02-19 16:43:39 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-02-25 14:03:56 +0100
commit3a92711511144763e42a9605479160583409861c (patch)
tree28a17fc4dfeb6ed85450958cc7f38576eb1f4e39 /fs/tftp.c
parent76c7f90a54a750f0779c81d13cd94e6f674848ad (diff)
downloadbarebox-3a92711511144763e42a9605479160583409861c.tar.gz
barebox-3a92711511144763e42a9605479160583409861c.tar.xz
fs: get fs device using container_of
This reduces the usage of dev->type_data. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/tftp.c')
-rw-r--r--fs/tftp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/tftp.c b/fs/tftp.c
index 512da0321d..463e0fc2d4 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -598,7 +598,7 @@ static int tftp_stat(struct device_d *dev, const char *filename, struct stat *s)
static int tftp_probe(struct device_d *dev)
{
- struct fs_device_d *fsdev = dev->type_data;
+ struct fs_device_d *fsdev = dev_to_fs_device(dev);
struct tftp_priv *priv = xzalloc(sizeof(struct tftp_priv));
dev->priv = priv;
@@ -633,7 +633,6 @@ static struct fs_driver_d tftp_driver = {
.probe = tftp_probe,
.remove = tftp_remove,
.name = "tftp",
- .type_data = &tftp_driver,
}
};