diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2008-12-03 08:52:21 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-15 22:39:33 -0500 |
commit | 46d01492b2c50791b9b66f9b9154ac8d25acaeb9 (patch) | |
tree | d2eb656cca68c874891415690627591864a50313 /arch/powerpc/platforms/ps3 | |
parent | 62d80749addc969803a173573889f9b01d2459e1 (diff) |
powerpc/ps3: Add sub-match id modalias support
commit 059e4938f8b060b10c4352e6c45739473bc73267 ("powerpc/ps3: Add a sub-match
id to ps3_system_bus") forgot to update the module alias support:
- Add the sub-match ids to the module aliases, so udev can distinguish
between different types of sub-devices.
- Rename PS3_MODULE_ALIAS_GRAPHICS to PS3_MODULE_ALIAS_GPU_FB, as ps3fb
binds to the "FB" sub-device.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3')
-rw-r--r-- | arch/powerpc/platforms/ps3/device-init.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index 43816da25ca6..dbc124e05646 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -497,8 +497,8 @@ static int __init ps3_register_graphics_devices(void) | |||
497 | if (!p) | 497 | if (!p) |
498 | return -ENOMEM; | 498 | return -ENOMEM; |
499 | 499 | ||
500 | p->dev.match_id = PS3_MATCH_ID_GRAPHICS; | 500 | p->dev.match_id = PS3_MATCH_ID_GPU; |
501 | p->dev.match_sub_id = PS3_MATCH_SUB_ID_FB; | 501 | p->dev.match_sub_id = PS3_MATCH_SUB_ID_GPU_FB; |
502 | p->dev.dev_type = PS3_DEVICE_TYPE_IOC0; | 502 | p->dev.dev_type = PS3_DEVICE_TYPE_IOC0; |
503 | 503 | ||
504 | result = ps3_system_bus_device_register(&p->dev); | 504 | result = ps3_system_bus_device_register(&p->dev); |
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index 661e9f77ebf6..d3da1e6e73bc 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -175,7 +175,7 @@ int ps3_open_hv_device(struct ps3_system_bus_device *dev) | |||
175 | return ps3_open_hv_device_sb(dev); | 175 | return ps3_open_hv_device_sb(dev); |
176 | 176 | ||
177 | case PS3_MATCH_ID_SOUND: | 177 | case PS3_MATCH_ID_SOUND: |
178 | case PS3_MATCH_ID_GRAPHICS: | 178 | case PS3_MATCH_ID_GPU: |
179 | return ps3_open_hv_device_gpu(dev); | 179 | return ps3_open_hv_device_gpu(dev); |
180 | 180 | ||
181 | case PS3_MATCH_ID_AV_SETTINGS: | 181 | case PS3_MATCH_ID_AV_SETTINGS: |
@@ -213,7 +213,7 @@ int ps3_close_hv_device(struct ps3_system_bus_device *dev) | |||
213 | return ps3_close_hv_device_sb(dev); | 213 | return ps3_close_hv_device_sb(dev); |
214 | 214 | ||
215 | case PS3_MATCH_ID_SOUND: | 215 | case PS3_MATCH_ID_SOUND: |
216 | case PS3_MATCH_ID_GRAPHICS: | 216 | case PS3_MATCH_ID_GPU: |
217 | return ps3_close_hv_device_gpu(dev); | 217 | return ps3_close_hv_device_gpu(dev); |
218 | 218 | ||
219 | case PS3_MATCH_ID_AV_SETTINGS: | 219 | case PS3_MATCH_ID_AV_SETTINGS: |
@@ -453,7 +453,8 @@ static int ps3_system_bus_uevent(struct device *_dev, struct kobj_uevent_env *en | |||
453 | { | 453 | { |
454 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | 454 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); |
455 | 455 | ||
456 | if (add_uevent_var(env, "MODALIAS=ps3:%d", dev->match_id)) | 456 | if (add_uevent_var(env, "MODALIAS=ps3:%d:%d", dev->match_id, |
457 | dev->match_sub_id)) | ||
457 | return -ENOMEM; | 458 | return -ENOMEM; |
458 | return 0; | 459 | return 0; |
459 | } | 460 | } |
@@ -462,7 +463,8 @@ static ssize_t modalias_show(struct device *_dev, struct device_attribute *a, | |||
462 | char *buf) | 463 | char *buf) |
463 | { | 464 | { |
464 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | 465 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); |
465 | int len = snprintf(buf, PAGE_SIZE, "ps3:%d\n", dev->match_id); | 466 | int len = snprintf(buf, PAGE_SIZE, "ps3:%d:%d\n", dev->match_id, |
467 | dev->match_sub_id); | ||
466 | 468 | ||
467 | return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; | 469 | return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; |
468 | } | 470 | } |