ppbconf.c (858a52f46425ce4e1b69b7c2462aab2b77b2acf9) ppbconf.c (ef544f631226436ef590825881e7a28369df82f6)
1/*-
2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 403 unchanged lines hidden (view full) ---

412 free(children, M_TEMP);
413 }
414
415 return (0);
416}
417
418static int
419ppbus_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
1/*-
2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 403 unchanged lines hidden (view full) ---

412 free(children, M_TEMP);
413 }
414
415 return (0);
416}
417
418static int
419ppbus_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
420 void (*ihand)(void *), void *arg, void **cookiep)
420 driver_filter_t *filt, void (*ihand)(void *), void *arg, void **cookiep)
421{
422 int error;
423 struct ppb_data *ppb = DEVTOSOFTC(bus);
424 struct ppb_device *ppbdev = (struct ppb_device *)device_get_ivars(child);
425
426 /* a device driver must own the bus to register an interrupt */
427 if (ppb->ppb_owner != child)
428 return (EINVAL);
429
430 if ((error = BUS_SETUP_INTR(device_get_parent(bus), child, r, flags,
421{
422 int error;
423 struct ppb_data *ppb = DEVTOSOFTC(bus);
424 struct ppb_device *ppbdev = (struct ppb_device *)device_get_ivars(child);
425
426 /* a device driver must own the bus to register an interrupt */
427 if (ppb->ppb_owner != child)
428 return (EINVAL);
429
430 if ((error = BUS_SETUP_INTR(device_get_parent(bus), child, r, flags,
431 ihand, arg, cookiep)))
431 filt, ihand, arg, cookiep)))
432 return (error);
433
434 /* store the resource and the cookie for eventually forcing
435 * handler unregistration
436 */
437 ppbdev->intr_cookie = *cookiep;
438 ppbdev->intr_resource = r;
439

--- 139 unchanged lines hidden ---
432 return (error);
433
434 /* store the resource and the cookie for eventually forcing
435 * handler unregistration
436 */
437 ppbdev->intr_cookie = *cookiep;
438 ppbdev->intr_resource = r;
439

--- 139 unchanged lines hidden ---