diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
commit | cf9b59e9d3e008591d1f54830f570982bb307a0d (patch) | |
tree | 113478ce8fd8c832ba726ffdf59b82cb46356476 /arch/powerpc/kernel/vio.c | |
parent | 44504b2bebf8b5823c59484e73096a7d6574471d (diff) | |
parent | f4b87dee923342505e1ddba8d34ce9de33e75050 (diff) |
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.
Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c
Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/kernel/vio.c')
-rw-r--r-- | arch/powerpc/kernel/vio.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 4cdd0f6df8bf..00b9436f7652 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -645,8 +645,10 @@ void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired) | |||
645 | found = 1; | 645 | found = 1; |
646 | break; | 646 | break; |
647 | } | 647 | } |
648 | if (!found) | 648 | if (!found) { |
649 | spin_unlock_irqrestore(&vio_cmo.lock, flags); | ||
649 | return; | 650 | return; |
651 | } | ||
650 | 652 | ||
651 | /* Increase/decrease in desired device entitlement */ | 653 | /* Increase/decrease in desired device entitlement */ |
652 | if (desired >= viodev->cmo.desired) { | 654 | if (desired >= viodev->cmo.desired) { |
@@ -958,9 +960,12 @@ viodev_cmo_rd_attr(allocated); | |||
958 | 960 | ||
959 | static ssize_t name_show(struct device *, struct device_attribute *, char *); | 961 | static ssize_t name_show(struct device *, struct device_attribute *, char *); |
960 | static ssize_t devspec_show(struct device *, struct device_attribute *, char *); | 962 | static ssize_t devspec_show(struct device *, struct device_attribute *, char *); |
963 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | ||
964 | char *buf); | ||
961 | static struct device_attribute vio_cmo_dev_attrs[] = { | 965 | static struct device_attribute vio_cmo_dev_attrs[] = { |
962 | __ATTR_RO(name), | 966 | __ATTR_RO(name), |
963 | __ATTR_RO(devspec), | 967 | __ATTR_RO(devspec), |
968 | __ATTR_RO(modalias), | ||
964 | __ATTR(cmo_desired, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH, | 969 | __ATTR(cmo_desired, S_IWUSR|S_IRUSR|S_IWGRP|S_IRGRP|S_IROTH, |
965 | viodev_cmo_desired_show, viodev_cmo_desired_set), | 970 | viodev_cmo_desired_show, viodev_cmo_desired_set), |
966 | __ATTR(cmo_entitled, S_IRUGO, viodev_cmo_entitled_show, NULL), | 971 | __ATTR(cmo_entitled, S_IRUGO, viodev_cmo_entitled_show, NULL), |
@@ -1320,9 +1325,27 @@ static ssize_t devspec_show(struct device *dev, | |||
1320 | return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none"); | 1325 | return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none"); |
1321 | } | 1326 | } |
1322 | 1327 | ||
1328 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, | ||
1329 | char *buf) | ||
1330 | { | ||
1331 | const struct vio_dev *vio_dev = to_vio_dev(dev); | ||
1332 | struct device_node *dn; | ||
1333 | const char *cp; | ||
1334 | |||
1335 | dn = dev->of_node; | ||
1336 | if (!dn) | ||
1337 | return -ENODEV; | ||
1338 | cp = of_get_property(dn, "compatible", NULL); | ||
1339 | if (!cp) | ||
1340 | return -ENODEV; | ||
1341 | |||
1342 | return sprintf(buf, "vio:T%sS%s\n", vio_dev->type, cp); | ||
1343 | } | ||
1344 | |||
1323 | static struct device_attribute vio_dev_attrs[] = { | 1345 | static struct device_attribute vio_dev_attrs[] = { |
1324 | __ATTR_RO(name), | 1346 | __ATTR_RO(name), |
1325 | __ATTR_RO(devspec), | 1347 | __ATTR_RO(devspec), |
1348 | __ATTR_RO(modalias), | ||
1326 | __ATTR_NULL | 1349 | __ATTR_NULL |
1327 | }; | 1350 | }; |
1328 | 1351 | ||
@@ -1365,6 +1388,7 @@ static struct bus_type vio_bus_type = { | |||
1365 | .match = vio_bus_match, | 1388 | .match = vio_bus_match, |
1366 | .probe = vio_bus_probe, | 1389 | .probe = vio_bus_probe, |
1367 | .remove = vio_bus_remove, | 1390 | .remove = vio_bus_remove, |
1391 | .pm = GENERIC_SUBSYS_PM_OPS, | ||
1368 | }; | 1392 | }; |
1369 | 1393 | ||
1370 | /** | 1394 | /** |