]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'workqueues/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 04:50:54 +0000 (14:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 04:50:54 +0000 (14:50 +1000)
Conflicts:
drivers/hid/hid-picolcd.c
drivers/isdn/mISDN/hwchannel.c
drivers/thermal/thermal_sys.c
drivers/video/omap2/displays/panel-taal.c

58 files changed:
1  2 
block/blk-core.c
block/genhd.c
drivers/block/floppy.c
drivers/char/tpm/tpm.c
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c
drivers/edac/edac_mc.c
drivers/gpu/drm/exynos/exynos_drm_g2d.c
drivers/hid/hid-wiimote-ext.c
drivers/infiniband/hw/nes/nes_hw.c
drivers/infiniband/hw/nes/nes_nic.c
drivers/isdn/mISDN/hwchannel.c
drivers/leds/leds-lp8788.c
drivers/md/dm-mpath.c
drivers/media/dvb-core/dvb_net.c
drivers/media/pci/bt8xx/bttv-driver.c
drivers/media/pci/cx18/cx18-driver.c
drivers/media/pci/cx23885/cx23885-input.c
drivers/media/pci/cx88/cx88-mpeg.c
drivers/media/pci/mantis/mantis_evm.c
drivers/media/pci/mantis/mantis_uart.c
drivers/media/pci/saa7134/saa7134-core.c
drivers/media/pci/saa7134/saa7134-empress.c
drivers/media/platform/omap24xxcam.c
drivers/media/usb/cx231xx/cx231xx-cards.c
drivers/media/usb/em28xx/em28xx-cards.c
drivers/media/usb/tm6000/tm6000-cards.c
drivers/mtd/mtdoops.c
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
drivers/net/ethernet/mellanox/mlx4/sense.c
drivers/net/ethernet/neterion/vxge/vxge-main.c
drivers/net/ethernet/sun/niu.c
drivers/net/virtio_net.c
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/platform/x86/thinkpad_acpi.c
drivers/power/ab8500_btemp.c
drivers/power/ab8500_charger.c
drivers/power/ab8500_fg.c
drivers/power/charger-manager.c
drivers/power/wm97xx_battery.c
drivers/regulator/core.c
drivers/scsi/ipr.c
drivers/scsi/qla2xxx/qla_target.c
drivers/thermal/thermal_sys.c
drivers/tty/serial/kgdboc.c
drivers/usb/gadget/u_ether.c
drivers/video/omap2/displays/panel-taal.c
drivers/video/omap2/dss/dsi.c
fs/gfs2/super.c
fs/xfs/xfs_super.c
mm/slab.c
mm/vmstat.c
net/9p/trans_fd.c
net/core/dst.c
net/core/link_watch.c
net/core/neighbour.c
sound/pci/oxygen/oxygen_lib.c
sound/soc/soc-core.c

Simple merge
diff --cc block/genhd.c
Simple merge
Simple merge
index 6724615a4fdd1827028a24fff16b91a5f29d16d7,3af9f4d1a23f200a27d8c03de477131967d0cbfd..f26afdb1a7026aed8a0173ff7a17ea87524661dd
@@@ -1168,10 -1172,10 +1168,10 @@@ int tpm_release(struct inode *inode, st
        struct tpm_chip *chip = file->private_data;
  
        del_singleshot_timer_sync(&chip->user_read_timer);
-       flush_work_sync(&chip->work);
+       flush_work(&chip->work);
        file->private_data = NULL;
        atomic_set(&chip->data_pending, 0);
 -      kfree(chip->data_buffer);
 +      kzfree(chip->data_buffer);
        clear_bit(0, &chip->is_open);
        put_device(chip->dev);
        return 0;
@@@ -1221,8 -1225,9 +1221,8 @@@ ssize_t tpm_read(struct file *file, cha
        int rc;
  
        del_singleshot_timer_sync(&chip->user_read_timer);
-       flush_work_sync(&chip->work);
+       flush_work(&chip->work);
        ret_size = atomic_read(&chip->data_pending);
 -      atomic_set(&chip->data_pending, 0);
        if (ret_size > 0) {     /* relay data */
                ssize_t orig_ret_size = ret_size;
                if (size < ret_size)
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 4f77d89cb1683cace5b43643b8754637ee243078,67789b8345d25cb7a5fad998863aab3c9d999689..d5455095edae6395ce1cdb968c049cacc23bf353
@@@ -161,263 -91,6 +161,260 @@@ static void release_idr(struct idr *idr
                mutex_unlock(lock);
  }
  
-       cancel_delayed_work(&(tz->poll_queue));
-       if (!delay)
-               return;
 +int get_tz_trend(struct thermal_zone_device *tz, int trip)
 +{
 +      enum thermal_trend trend;
 +
 +      if (!tz->ops->get_trend || tz->ops->get_trend(tz, trip, &trend)) {
 +              if (tz->temperature > tz->last_temperature)
 +                      trend = THERMAL_TREND_RAISING;
 +              else if (tz->temperature < tz->last_temperature)
 +                      trend = THERMAL_TREND_DROPPING;
 +              else
 +                      trend = THERMAL_TREND_STABLE;
 +      }
 +
 +      return trend;
 +}
 +EXPORT_SYMBOL(get_tz_trend);
 +
 +struct thermal_instance *get_thermal_instance(struct thermal_zone_device *tz,
 +                      struct thermal_cooling_device *cdev, int trip)
 +{
 +      struct thermal_instance *pos = NULL;
 +      struct thermal_instance *target_instance = NULL;
 +
 +      mutex_lock(&tz->lock);
 +      mutex_lock(&cdev->lock);
 +
 +      list_for_each_entry(pos, &tz->thermal_instances, tz_node) {
 +              if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) {
 +                      target_instance = pos;
 +                      break;
 +              }
 +      }
 +
 +      mutex_unlock(&cdev->lock);
 +      mutex_unlock(&tz->lock);
 +
 +      return target_instance;
 +}
 +EXPORT_SYMBOL(get_thermal_instance);
 +
 +static void print_bind_err_msg(struct thermal_zone_device *tz,
 +                      struct thermal_cooling_device *cdev, int ret)
 +{
 +      dev_err(&tz->device, "binding zone %s with cdev %s failed:%d\n",
 +                              tz->type, cdev->type, ret);
 +}
 +
 +static void __bind(struct thermal_zone_device *tz, int mask,
 +                      struct thermal_cooling_device *cdev)
 +{
 +      int i, ret;
 +
 +      for (i = 0; i < tz->trips; i++) {
 +              if (mask & (1 << i)) {
 +                      ret = thermal_zone_bind_cooling_device(tz, i, cdev,
 +                                      THERMAL_NO_LIMIT, THERMAL_NO_LIMIT);
 +                      if (ret)
 +                              print_bind_err_msg(tz, cdev, ret);
 +              }
 +      }
 +}
 +
 +static void __unbind(struct thermal_zone_device *tz, int mask,
 +                      struct thermal_cooling_device *cdev)
 +{
 +      int i;
 +
 +      for (i = 0; i < tz->trips; i++)
 +              if (mask & (1 << i))
 +                      thermal_zone_unbind_cooling_device(tz, i, cdev);
 +}
 +
 +static void bind_cdev(struct thermal_cooling_device *cdev)
 +{
 +      int i, ret;
 +      const struct thermal_zone_params *tzp;
 +      struct thermal_zone_device *pos = NULL;
 +
 +      mutex_lock(&thermal_list_lock);
 +
 +      list_for_each_entry(pos, &thermal_tz_list, node) {
 +              if (!pos->tzp && !pos->ops->bind)
 +                      continue;
 +
 +              if (!pos->tzp && pos->ops->bind) {
 +                      ret = pos->ops->bind(pos, cdev);
 +                      if (ret)
 +                              print_bind_err_msg(pos, cdev, ret);
 +              }
 +
 +              tzp = pos->tzp;
 +              if (!tzp->tbp)
 +                      return;
 +
 +              for (i = 0; i < tzp->num_tbps; i++) {
 +                      if (tzp->tbp[i].cdev || !tzp->tbp[i].match)
 +                              continue;
 +                      if (tzp->tbp[i].match(pos, cdev))
 +                              continue;
 +                      tzp->tbp[i].cdev = cdev;
 +                      __bind(pos, tzp->tbp[i].trip_mask, cdev);
 +              }
 +      }
 +
 +      mutex_unlock(&thermal_list_lock);
 +}
 +
 +static void bind_tz(struct thermal_zone_device *tz)
 +{
 +      int i, ret;
 +      struct thermal_cooling_device *pos = NULL;
 +      const struct thermal_zone_params *tzp = tz->tzp;
 +
 +      if (!tzp && !tz->ops->bind)
 +              return;
 +
 +      mutex_lock(&thermal_list_lock);
 +
 +      /* If there is no platform data, try to use ops->bind */
 +      if (!tzp && tz->ops->bind) {
 +              list_for_each_entry(pos, &thermal_cdev_list, node) {
 +                      ret = tz->ops->bind(tz, pos);
 +                      if (ret)
 +                              print_bind_err_msg(tz, pos, ret);
 +              }
 +              goto exit;
 +      }
 +
 +      if (!tzp->tbp)
 +              goto exit;
 +
 +      list_for_each_entry(pos, &thermal_cdev_list, node) {
 +              for (i = 0; i < tzp->num_tbps; i++) {
 +                      if (tzp->tbp[i].cdev || !tzp->tbp[i].match)
 +                              continue;
 +                      if (tzp->tbp[i].match(tz, pos))
 +                              continue;
 +                      tzp->tbp[i].cdev = pos;
 +                      __bind(tz, tzp->tbp[i].trip_mask, pos);
 +              }
 +      }
 +exit:
 +      mutex_unlock(&thermal_list_lock);
 +}
 +
 +static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
 +                                          int delay)
 +{
-               queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
-                                     round_jiffies(msecs_to_jiffies(delay)));
 +      if (delay > 1000)
-               queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
-                                     msecs_to_jiffies(delay));
++              mod_delayed_work(system_freezable_wq, &tz->poll_queue,
++                               round_jiffies(msecs_to_jiffies(delay)));
++      else if (delay)
++              mod_delayed_work(system_freezable_wq, &tz->poll_queue,
++                               msecs_to_jiffies(delay));
 +      else
++              cancel_delayed_work(&tz->poll_queue);
 +}
 +
 +static void monitor_thermal_zone(struct thermal_zone_device *tz)
 +{
 +      mutex_lock(&tz->lock);
 +
 +      if (tz->passive)
 +              thermal_zone_device_set_polling(tz, tz->passive_delay);
 +      else if (tz->polling_delay)
 +              thermal_zone_device_set_polling(tz, tz->polling_delay);
 +      else
 +              thermal_zone_device_set_polling(tz, 0);
 +
 +      mutex_unlock(&tz->lock);
 +}
 +
 +static void handle_non_critical_trips(struct thermal_zone_device *tz,
 +                      int trip, enum thermal_trip_type trip_type)
 +{
 +      tz->governor->throttle(tz, trip);
 +}
 +
 +static void handle_critical_trips(struct thermal_zone_device *tz,
 +                              int trip, enum thermal_trip_type trip_type)
 +{
 +      long trip_temp;
 +
 +      tz->ops->get_trip_temp(tz, trip, &trip_temp);
 +
 +      /* If we have not crossed the trip_temp, we do not care. */
 +      if (tz->temperature < trip_temp)
 +              return;
 +
 +      if (tz->ops->notify)
 +              tz->ops->notify(tz, trip, trip_type);
 +
 +      if (trip_type == THERMAL_TRIP_CRITICAL) {
 +              pr_emerg("Critical temperature reached(%d C),shutting down\n",
 +                       tz->temperature / 1000);
 +              orderly_poweroff(true);
 +      }
 +}
 +
 +static void handle_thermal_trip(struct thermal_zone_device *tz, int trip)
 +{
 +      enum thermal_trip_type type;
 +
 +      tz->ops->get_trip_type(tz, trip, &type);
 +
 +      if (type == THERMAL_TRIP_CRITICAL || type == THERMAL_TRIP_HOT)
 +              handle_critical_trips(tz, trip, type);
 +      else
 +              handle_non_critical_trips(tz, trip, type);
 +      /*
 +       * Alright, we handled this trip successfully.
 +       * So, start monitoring again.
 +       */
 +      monitor_thermal_zone(tz);
 +}
 +
 +static void update_temperature(struct thermal_zone_device *tz)
 +{
 +      long temp;
 +      int ret;
 +
 +      mutex_lock(&tz->lock);
 +
 +      ret = tz->ops->get_temp(tz, &temp);
 +      if (ret) {
 +              pr_warn("failed to read out thermal zone %d\n", tz->id);
 +              return;
 +      }
 +
 +      tz->last_temperature = tz->temperature;
 +      tz->temperature = temp;
 +
 +      mutex_unlock(&tz->lock);
 +}
 +
 +void thermal_zone_device_update(struct thermal_zone_device *tz)
 +{
 +      int count;
 +
 +      update_temperature(tz);
 +
 +      for (count = 0; count < tz->trips; count++)
 +              handle_thermal_trip(tz, count);
 +}
 +EXPORT_SYMBOL(thermal_zone_device_update);
 +
 +static void thermal_zone_device_check(struct work_struct *work)
 +{
 +      struct thermal_zone_device *tz = container_of(work, struct
 +                                                    thermal_zone_device,
 +                                                    poll_queue.work);
 +      thermal_zone_device_update(tz);
 +}
 +
  /* sys I/F for thermal zone */
  
  #define to_thermal_zone(_dev) \
Simple merge
Simple merge
index 4cf94161ff5101a74fcf0cdb165ce8c9f3aa1f2e,6b5e6e0e202f253cada3b80ddf5d14db9b4b0bd7..f2f644680ca8dfe2262fac39c42fcd50766982f0
@@@ -925,50 -900,29 +925,50 @@@ static int taal_probe(struct omap_dss_d
  
        atomic_set(&td->do_update, 0);
  
 -      td->workqueue = create_singlethread_workqueue("taal_esd");
 -      if (td->workqueue == NULL) {
 -              dev_err(&dssdev->dev, "can't create ESD workqueue\n");
 -              r = -ENOMEM;
 -              goto err_wq;
 +      if (gpio_is_valid(td->reset_gpio)) {
 +              r = devm_gpio_request_one(&dssdev->dev, td->reset_gpio,
 +                              GPIOF_OUT_INIT_LOW, "taal rst");
 +              if (r) {
 +                      dev_err(&dssdev->dev, "failed to request reset gpio\n");
 +                      return r;
 +              }
        }
 -      INIT_DEFERRABLE_WORK(&td->esd_work, taal_esd_work);
 -      INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work);
  
 -      dev_set_drvdata(&dssdev->dev, td);
 +      if (gpio_is_valid(td->ext_te_gpio)) {
 +              r = devm_gpio_request_one(&dssdev->dev, td->ext_te_gpio,
 +                              GPIOF_IN, "taal irq");
 +              if (r) {
 +                      dev_err(&dssdev->dev, "GPIO request failed\n");
 +                      return r;
 +              }
 +
 +              r = devm_request_irq(&dssdev->dev, gpio_to_irq(td->ext_te_gpio),
 +                              taal_te_isr,
 +                              IRQF_TRIGGER_RISING,
 +                              "taal vsync", dssdev);
  
 -      if (gpio_is_valid(panel_data->reset_gpio)) {
 -              r = gpio_request_one(panel_data->reset_gpio, GPIOF_OUT_INIT_LOW,
 -                              "taal rst");
                if (r) {
 -                      dev_err(&dssdev->dev, "failed to request reset gpio\n");
 -                      goto err_rst_gpio;
 +                      dev_err(&dssdev->dev, "IRQ request failed\n");
 +                      return r;
                }
-               INIT_DELAYED_WORK_DEFERRABLE(&td->te_timeout_work,
 +
++              INIT_DEFERRABLE_WORK(&td->te_timeout_work,
 +                                      taal_te_timeout_work_callback);
 +
 +              dev_dbg(&dssdev->dev, "Using GPIO TE\n");
        }
  
-       INIT_DELAYED_WORK_DEFERRABLE(&td->esd_work, taal_esd_work);
 +      td->workqueue = create_singlethread_workqueue("taal_esd");
 +      if (td->workqueue == NULL) {
 +              dev_err(&dssdev->dev, "can't create ESD workqueue\n");
 +              return -ENOMEM;
 +      }
++      INIT_DEFERRABLE_WORK(&td->esd_work, taal_esd_work);
 +      INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work);
 +
        taal_hw_reset(dssdev);
  
 -      if (panel_data->use_dsi_backlight) {
 +      if (td->use_dsi_backlight) {
                memset(&props, 0, sizeof(struct backlight_properties));
                props.max_brightness = 255;
  
Simple merge
diff --cc fs/gfs2/super.c
Simple merge
Simple merge
diff --cc mm/slab.c
Simple merge
diff --cc mm/vmstat.c
Simple merge
Simple merge
diff --cc net/core/dst.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge