Code cleanup in NewGPIODriver func.

Don't assign the object to a variable just return it right away.
This commit is contained in:
SjB 2014-04-09 00:09:13 -04:00
parent 919b01a3a2
commit e1a90ade4f
1 changed files with 1 additions and 2 deletions

View File

@ -34,7 +34,7 @@ type gpioDriver struct {
// NewGPIODriver returns a GPIODriver interface which allows control
// over the GPIO subsystem.
func NewGPIODriver(pinMap PinMap, dpf digitalPinFactory, apf analogPinFactory, ppf pwmPinFactory) GPIODriver {
driver := &gpioDriver{
return &gpioDriver{
pinMap: pinMap,
dpf: dpf,
apf: apf,
@ -43,7 +43,6 @@ func NewGPIODriver(pinMap PinMap, dpf digitalPinFactory, apf analogPinFactory, p
watchEventCallbacks: map[int]InterruptPin{},
initializedPins: map[string]pin{},
}
return driver
}
var epollFD int