dahdi_handle_device: Auto assign only the device being added.
authorShaun Ruffell <sruffell@digium.com>
Thu, 9 Jan 2014 00:14:05 +0000 (18:14 -0600)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 20 Jan 2014 17:22:57 +0000 (19:22 +0200)
commita4f79134c959830bfcb869068cd1cf4891f00527
treee25f8aa73cd43e13297e12c18d877433f5626e2c
parentd8074f434f550f00a1e484d413309ac32b466883
dahdi_handle_device: Auto assign only the device being added.

Eliminates trying to add spans multiple times as seen below:

    'dahdi_handle_device'[21993]: add: /devices/dynamic:loc:1
    'dahdi_handle_device'[21991]: add: /devices/dynamic:loc:0
    'dahdi_handle_device'[22001]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:0
    'dahdi_handle_device'[22001]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:1
    'dahdi_handle_device'[21999]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:0
    'dahdi_handle_device'[21999]: auto-assign /sys/bus/dahdi_devices/devices/dynamic:loc:1
    kernel: [ 3348.312534] dahdi_devices dynamic:loc:0: local span 1 is already assigned span 1
    kernel: [ 3348.312552] dahdi_devices dynamic:loc:1: local span 1 is already assigned span 2

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
dahdi_handle_device