static void fslepdc_hal_exit(void)
{
    fslepdc_repair_count = 0;
    fslepdc_removed = 1;
    cancel_rearming_delayed_work(&fslepdc_send_update_work);
    cancel_rearming_delayed_work(&fslepdc_repair_work);
    einkfb_hal_ops_done();
}
Beispiel #2
0
static int ipheth_close(struct net_device *net)
{
	struct ipheth_device *dev = netdev_priv(net);

	cancel_rearming_delayed_work(&dev->carrier_work);
	netif_stop_queue(net);
	return 0;
}
Beispiel #3
0
void r8187_stop_RateAdaptive(_adapter *padapter)
{
	struct mib_info *_sys_mib = &(padapter->_sys_mib);
	if(_sys_mib->bRateAdaptive){
		cancel_rearming_delayed_work(&_sys_mib->RateAdaptiveWorkItem);
		_sys_mib->bRateAdaptive = _FALSE;
	}
	else flush_scheduled_work();
}
Beispiel #4
0
void r8187_stop_DynamicInitGain(_adapter *padapter)
{
	struct mib_info *_sys_mib = &(padapter->_sys_mib);
	if(_sys_mib->bDynamicInitGain){
		cancel_rearming_delayed_work(&_sys_mib->DigWorkItem);
		_sys_mib->bDynamicInitGain= _FALSE;
	}
	else flush_scheduled_work();
}
Beispiel #5
0
void rt2x00link_stop_tuner(struct rt2x00_dev *rt2x00dev)
{
#if 0 /* Not in RHEL5... */
	cancel_delayed_work_sync(&rt2x00dev->link.work);
#else
	if (delayed_work_pending(&rt2x00dev->link.work))
		cancel_rearming_delayed_work(&rt2x00dev->link.work);
#endif
}
static void __exit bq27541_battery_exit(void)
{
	if (bq27541_battery_present) {
		battery_driver_stopped = 1;
		cancel_rearming_delayed_work(&battery_work);
		bq27541_battery_sysdev_ctrl_exit();
	}
	i2c_del_driver(&bq27541_i2c_driver);
}
static int bq27541_battery_suspend(struct i2c_client *client, pm_message_t state)
{
	if (bq27541_battery_present) {
		battery_driver_stopped = 1;
		cancel_rearming_delayed_work(&battery_work);
		i2c_error_counter = 0;
	}

	return 0;
}
int dvb_usb_remote_exit(struct dvb_usb_device *d)
{
	if (d->state & DVB_USB_STATE_REMOTE) {
		cancel_rearming_delayed_work(&d->rc_query_work);
		flush_scheduled_work();
		input_unregister_device(d->rc_input_dev);
	}
	d->state &= ~DVB_USB_STATE_REMOTE;
	return 0;
}
void em28xx_deregister_snapshot_button(struct em28xx *dev)
{
	if (dev->sbutton_input_dev != NULL) {
		em28xx_info("Deregistering snapshot button\n");
		cancel_rearming_delayed_work(&dev->sbutton_query_work);
		input_unregister_device(dev->sbutton_input_dev);
		dev->sbutton_input_dev = NULL;
	}
	return;
}
static int bq27541_remove(struct i2c_client *client)
{
        struct bq27541_info *info = i2c_get_clientdata(client);

        if (bq27541_battery_present) {
                battery_driver_stopped = 1;
		cancel_rearming_delayed_work(&battery_work);
                bq27541_battery_sysdev_ctrl_exit();
        }

        i2c_set_clientdata(client, info);

        return 0;
}
static int papyrus_suspend(struct i2c_client *client, pm_message_t state)
{
	struct papyrus *papyrus = i2c_get_clientdata(client);

	/* Cancel temp work */
	cancel_rearming_delayed_work(&papyrus_temp_work);

	papyrus_stby_mode = 1;

	i2c_smbus_write_byte_data(client, REG_PAPYRUS_ENABLE, PAPYRUS_STANDBY_REGS);

	/* Pull down the GPIO pin for sleep mode */
	gpio_set_value(papyrus->gpio_pmic_wakeup, 0);
	gpio_set_value(papyrus->gpio_pmic_vcom_ctrl, 0);

	return 0;
}
Beispiel #12
0
static void cxacru_unbind(struct usbatm_data *usbatm_instance,
		struct usb_interface *intf)
{
	struct cxacru_data *instance = usbatm_instance->driver_data;
	int is_polling = 1;

	dbg("cxacru_unbind entered");

	if (!instance) {
		dbg("cxacru_unbind: NULL instance!");
		return;
	}

	mutex_lock(&instance->poll_state_serialize);
	BUG_ON(instance->poll_state == CXPOLL_SHUTDOWN);

	/* ensure that status polling continues unless
	 * it has already stopped */
	if (instance->poll_state == CXPOLL_STOPPED)
		is_polling = 0;

	/* stop polling from being stopped or started */
	instance->poll_state = CXPOLL_SHUTDOWN;
	mutex_unlock(&instance->poll_state_serialize);

	if (is_polling)
		cancel_rearming_delayed_work(&instance->poll_work);

	usb_kill_urb(instance->snd_urb);
	usb_kill_urb(instance->rcv_urb);
	usb_free_urb(instance->snd_urb);
	usb_free_urb(instance->rcv_urb);

	free_page((unsigned long) instance->snd_buf);
	free_page((unsigned long) instance->rcv_buf);

	kfree(instance);

	usbatm_instance->driver_data = NULL;
}
Beispiel #13
0
void netpoll_cleanup(struct netpoll *np)
{
	struct netpoll_info *npinfo;
	unsigned long flags;

	if (np->dev) {
		npinfo = np->dev->npinfo;
		if (npinfo) {
			if (npinfo->rx_np == np) {
				spin_lock_irqsave(&npinfo->rx_lock, flags);
				npinfo->rx_np = NULL;
				npinfo->rx_flags &= ~NETPOLL_RX_ENABLED;
				spin_unlock_irqrestore(&npinfo->rx_lock, flags);
			}

			np->dev->npinfo = NULL;
			if (atomic_dec_and_test(&npinfo->refcnt)) {
				skb_queue_purge(&npinfo->arp_tx);
				skb_queue_purge(&npinfo->txq);
				cancel_rearming_delayed_work(&npinfo->tx_work);

				/* clean after last, unfinished work */
				if (!skb_queue_empty(&npinfo->txq)) {
					struct sk_buff *skb;
					skb = __skb_dequeue(&npinfo->txq);
					kfree_skb(skb);
				}
				kfree(npinfo);
			}
		}

		dev_put(np->dev);
	}

	np->dev = NULL;
}
Beispiel #14
0
static void fslepdc_update_area(update_area_t *update_area)
{
    int is_MU = 0;

    if ( einkfb_power_level_on == fslepdc_power_level )
    {
        fx_type update_mode = update_area->which_fx;
        u8 *data = update_area->buffer;

        if ( fx_display_sync == update_mode )
        {
            fslepdc_sync();
            data = NULL;
        }
    
        if ( data || UPDATE_MODE_BUFFER_DISPLAY(update_mode) )
        {
            bool    skip_buffer_display = false,
                    skip_buffer_load    = false,
                    flashing_update     = false, 
                    area_update         = false;
            u32     waveform_mode       = fslepdc_get_waveform_mode(WF_UPD_MODE_GC);
            
            struct mxcfb_update_data update_data;
            struct mxcfb_rect dirty_rect;
            struct einkfb_info info;

	    cancel_rearming_delayed_work(&fslepdc_repair_work);
            
            fslepdc_set_ld_img_start = jiffies;
            
            fsledpc_init_update_data(&update_data);
            einkfb_get_info(&info);
        
            update_data.update_region.left   = update_area->x1;
            update_data.update_region.top    = update_area->y1;
            update_data.update_region.width  = update_area->x2 - update_area->x1;
            update_data.update_region.height = update_area->y2 - update_area->y1; ;
            
            if ( (info.xres == update_data.update_region.width) && (info.yres == update_data.update_region.height) )
                area_update = false;
            else
                area_update = true;
            
            switch ( update_mode )
            {
                // Just load up the hardware's buffer; don't display it.
                //
                case fx_buffer_load:
                    skip_buffer_display = true;
                break;
        
                // Just display what's already in the hardware buffer; don't reload it.
                //
                case fx_buffer_display_partial:
                case fx_buffer_display_full:
                    skip_buffer_load = true;
                goto set_update_mode;
        
                // Regardless of what gets put into the hardware's buffer,
                // only update the black and white pixels.
                //
                case fx_update_fast:
                  waveform_mode = fslepdc_get_waveform_mode(WF_UPD_MODE_PU);
                  is_MU = is_MU_skip;
                goto set_update_mode;
        
                // Regardless of what gets put into the hardware's buffer,
                // use white transition update.
                //
                case fx_update_white_trans:
                  waveform_mode = fslepdc_get_waveform_mode(WF_UPD_MODE_GLF);
                  is_MU = is_MU_skip;
                goto set_update_mode;
                    
                // Regardless of what gets put into the hardware's buffer,
                // refresh all pixels as cleanly as possible.
                //
                case fx_update_slow:
                  waveform_mode = fslepdc_get_waveform_mode(WF_UPD_MODE_GC);
                  is_MU = is_MU_skip;
                /* goto set_update_mode; */
                    
                set_update_mode:
                default:
                    
                    // Normalize to either flashing or non-flashing.
                    //
                    update_mode     = area_update     ? UPDATE_AREA_MODE(update_mode)
                                                      : UPDATE_MODE(update_mode);
                    
                    // Simplify that.
                    //
                    flashing_update = UPDATE_FULL(update_mode);

                    // Don't use DU/MU for flashing updates
                    is_MU = flashing_update ? is_MU_skip : is_MU;

                    // Convert to the MXC EPDC's scheme.
                    //
                    update_mode     = flashing_update ? UPDATE_MODE_FULL
                                                      : UPDATE_MODE_PARTIAL;
                break;
            }
    
            // Process and load the image data if we should.
            //
            fslepdc_ld_img_start = jiffies;
           
	    if (!skip_buffer_load)
	    {
                // Check to see whether we can force an MU or not.
                //
                if (mxc_epdc_blit_to_fb(data, &update_data.update_region, &dirty_rect))
                {
                        // In the fx_update_fast & fx_update_slow cases, we want very
                        // specific waveform modes.  So, in those cases, we don't
                        // want to force an MU, even if we can.
                        //
                        if (0 == is_MU)
                                is_MU = 1;

                }
            }

            // Skip the forced MU when we should.
            //
            if (is_MU_skip == is_MU)
                is_MU = 0;

            // Update the display in the specified way if we should.
            //
            fslepdc_upd_data_start = jiffies;

            if ( !skip_buffer_display )
            {
                // If this is a flashing or a full-screen update, wait until
                // the last update completes before sending a new one.
                //
                if ( flashing_update || !area_update ) {
			if (fslepdc_repair_x1 && fslepdc_repair_y1 && 
				((fslepdc_repair_y2 - fslepdc_repair_y1) <= 300) &&
				((fslepdc_repair_x2 - fslepdc_repair_x1) <= 300) )
			{
				/* Do Nothing */
			}
			else {
				if ( (fslepdc_var.xres == (fslepdc_repair_x2 - fslepdc_repair_x1)) &&
					(fslepdc_var.yres == (fslepdc_repair_y2 - fslepdc_repair_y1)) ){
						/* Do Nothing */
				}
				else 
					fslepdc_sync();
			}
		}
                
                // Set up to perform the specified update type, marking it pseudo-uniquely.  Also,
                // if we're using the built-in waveform, which is 25C-only, don't even bother
                // using the cached temperature since it won't be used anyway.
                //
    
                update_data.update_mode   = update_mode;
                update_data.temp          = fslepdc_using_builtin_waveform() ? TEMP_USE_AMBIENT
                                                                             : fslepdc_read_temperature();

                // Send the update itself.
                //
		if (is_MU)
			update_data.waveform_mode = WF_UPD_MODE_MU;
		else
			update_data.waveform_mode = waveform_mode;

		fslepdc_last_update_marker++;
		update_data.update_marker = fslepdc_last_update_marker;
			
		/* repair logic */
		if (!fslepdc_repair_count ) {
			fslepdc_repair_x1 = update_data.update_region.left;
			fslepdc_repair_y1 = update_data.update_region.top;
			fslepdc_repair_x2 = fslepdc_repair_x1 + update_data.update_region.width;
			fslepdc_repair_y2 = fslepdc_repair_y1 + update_data.update_region.height;

			fslepdc_repair_count++;
		}
		else {
			fslepdc_repair_x1 = min(update_data.update_region.left, fslepdc_repair_x1);
			fslepdc_repair_y1 = min(update_data.update_region.top, fslepdc_repair_y1);
			fslepdc_repair_x2 = max((update_data.update_region.left +
					update_data.update_region.width), fslepdc_repair_x2);

			fslepdc_repair_y2 = max((update_data.update_region.top +
					update_data.update_region.height), fslepdc_repair_y2);
			fslepdc_repair_count++;
		}

		fslepdc_send_update(&update_data, FSLEPDC_UPDATE_NEW);
		if (UPDATE_MODE_FULL == update_data.update_mode) {
			fslepdc_repair_count = 0;
		}
		else {
			schedule_delayed_work(&fslepdc_repair_work, msecs_to_jiffies(1000));
		}
	}

	fslepdc_image_stop_time = jiffies;
    
	fslepdc_image_start_time = jiffies_to_msecs(fslepdc_set_ld_img_start - info.jif_on);
	fslepdc_image_processing_time = jiffies_to_msecs(fslepdc_ld_img_start - fslepdc_set_ld_img_start);
	fslepdc_image_loading_time = jiffies_to_msecs(fslepdc_upd_data_start - fslepdc_ld_img_start);
	fslepdc_image_display_time = jiffies_to_msecs(fslepdc_image_stop_time  - fslepdc_upd_data_start);
	fslepdc_image_stop_time = jiffies_to_msecs(fslepdc_image_stop_time  - info.jif_on);
        }
    }
}
Beispiel #15
0
static int my3126_interrupt_disable(struct cphy *cphy)
{
	cancel_rearming_delayed_work(&cphy->phy_update);
	return 0;
}