{
        if (udc->gpiod) {
                gpiod_set_value(udc->gpiod, on);
-       } else if (udc->mach && udc->mach->udc_command) {
+       } else if (udc->udc_command) {
                if (on)
-                       udc->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
+                       udc->udc_command(PXA2XX_UDC_CMD_CONNECT);
                else
-                       udc->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
+                       udc->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
        }
        udc->pullup_on = on;
 }
 {
        struct pxa_udc *udc = to_gadget_udc(_gadget);
 
-       if (!udc->gpiod && !udc->mach->udc_command)
+       if (!udc->gpiod && !udc->udc_command)
                return -EOPNOTSUPP;
 
        dplus_pullup(udc, is_active);
                                return retval;
                        udc->gpiod = gpio_to_desc(mach->gpio_pullup);
                }
-               udc->mach = mach;
+               udc->udc_command = mach->udc_command;
        }
 
        regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
  * @usb_gadget: udc gadget structure
  * @driver: bound gadget (zero, g_ether, g_mass_storage, ...)
  * @dev: device
- * @mach: machine info, used to activate specific GPIO
+ * @udc_command: machine specific function to activate D+ pullup
  * @gpiod: gpio descriptor of gpio for D+ pullup (or NULL if none)
  * @transceiver: external transceiver to handle vbus sense and D+ pullup
  * @ep0state: control endpoint state machine state
        struct usb_gadget                       gadget;
        struct usb_gadget_driver                *driver;
        struct device                           *dev;
-       struct pxa2xx_udc_mach_info             *mach;
+       void                                    (*udc_command)(int);
        struct gpio_desc                        *gpiod;
        struct usb_phy                          *transceiver;