Commit 8763960f authored by Martin Hicks's avatar Martin Hicks Committed by James Bottomley

[PATCH] Fix template size calculation in transport attributes

This small patch fixes the template size calculation in
{spi,fc}_attach_transport().
parent 73e07d1f
......@@ -159,7 +159,7 @@ fc_attach_transport(struct fc_function_template *ft)
i->t.attrs = &i->attrs[0];
i->t.class = &fc_transport_class;
i->t.setup = &fc_setup_transport_attrs;
i->t.size = sizeof(struct fc_transport_attrs) - sizeof(unsigned long);
i->t.size = sizeof(struct fc_transport_attrs);
i->f = ft;
SETUP_ATTRIBUTE_RD(port_id);
......
......@@ -663,7 +663,7 @@ spi_attach_transport(struct spi_function_template *ft)
i->t.attrs = &i->attrs[0];
i->t.class = &spi_transport_class;
i->t.setup = &spi_setup_transport_attrs;
i->t.size = sizeof(struct spi_transport_attrs) - sizeof(unsigned long);
i->t.size = sizeof(struct spi_transport_attrs);
i->f = ft;
SETUP_ATTRIBUTE(period);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment