diff options
Diffstat (limited to 'drivers/ieee1394/dv1394.c')
-rw-r--r-- | drivers/ieee1394/dv1394.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c index 1084da4d88a9..d636cfad7fcf 100644 --- a/drivers/ieee1394/dv1394.c +++ b/drivers/ieee1394/dv1394.c | |||
@@ -2267,11 +2267,7 @@ static void dv1394_remove_host (struct hpsb_host *host) | |||
2267 | { | 2267 | { |
2268 | struct video_card *video; | 2268 | struct video_card *video; |
2269 | unsigned long flags; | 2269 | unsigned long flags; |
2270 | int id = host->id; | 2270 | int id = host->id, found_ohci_card = 0; |
2271 | |||
2272 | /* We only work with the OHCI-1394 driver */ | ||
2273 | if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME)) | ||
2274 | return; | ||
2275 | 2271 | ||
2276 | /* find the corresponding video_cards */ | 2272 | /* find the corresponding video_cards */ |
2277 | do { | 2273 | do { |
@@ -2284,6 +2280,7 @@ static void dv1394_remove_host (struct hpsb_host *host) | |||
2284 | if ((tmp_vid->id >> 2) == id) { | 2280 | if ((tmp_vid->id >> 2) == id) { |
2285 | list_del(&tmp_vid->list); | 2281 | list_del(&tmp_vid->list); |
2286 | video = tmp_vid; | 2282 | video = tmp_vid; |
2283 | found_ohci_card = 1; | ||
2287 | break; | 2284 | break; |
2288 | } | 2285 | } |
2289 | } | 2286 | } |
@@ -2293,8 +2290,9 @@ static void dv1394_remove_host (struct hpsb_host *host) | |||
2293 | dv1394_un_init(video); | 2290 | dv1394_un_init(video); |
2294 | } while (video != NULL); | 2291 | } while (video != NULL); |
2295 | 2292 | ||
2296 | class_device_destroy(hpsb_protocol_class, | 2293 | if (found_ohci_card) |
2297 | MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2))); | 2294 | class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR, |
2295 | IEEE1394_MINOR_BLOCK_DV1394 * 16 + (host->id << 2))); | ||
2298 | } | 2296 | } |
2299 | 2297 | ||
2300 | static void dv1394_add_host (struct hpsb_host *host) | 2298 | static void dv1394_add_host (struct hpsb_host *host) |