return -ENODATA;
                        }
                        schedule_timeout((100 * HZ + 999) / 1000);
-                       ir->tx->need_boot = 1;
+                       if (ir->tx != NULL)
+                               ir->tx->need_boot = 1;
 
                        ++failures;
                        mutex_unlock(&ir->ir_lock);
        int result;
        unsigned long mode, features = 0;
 
-       features |= LIRC_CAN_SEND_PULSE;
        if (ir->rx != NULL)
                features |= LIRC_CAN_REC_LIRCCODE;
+       if (ir->tx != NULL)
+               features |= LIRC_CAN_SEND_PULSE;
 
        switch (cmd) {
        case LIRC_GET_LENGTH:
                        result = -EINVAL;
                break;
        case LIRC_GET_SEND_MODE:
+               if (!(features&LIRC_CAN_SEND_MASK))
+                       return -ENOSYS;
+
                result = put_user(LIRC_MODE_PULSE, (unsigned long *) arg);
                break;
        case LIRC_SET_SEND_MODE:
+               if (!(features&LIRC_CAN_SEND_MASK))
+                       return -ENOSYS;
+
                result = get_user(mode, (unsigned long *) arg);
                if (!result && mode != LIRC_MODE_PULSE)
                        return -EINVAL;
        }
 
        /* Good-bye Tx */
-       i2c_set_clientdata(ir->tx->c, NULL);
-       kfree(ir->tx);
+       if (ir->tx != NULL) {
+               i2c_set_clientdata(ir->tx->c, NULL);
+               kfree(ir->tx);
+       }
 
        /* Good-bye IR */
        del_ir_device(ir);
         * after registering with lirc as otherwise hotplug seems to take
         * 10s to create the lirc device.
         */
-       ret = tx_init(ir->tx);
-       if (ret != 0)
-               goto out_unregister;
+       if (ir->tx != NULL) {
+               /* Special TX init */
+               ret = tx_init(ir->tx);
+               if (ret != 0)
+                       goto out_unregister;
+       }
 
        zilog_info("probe of IR %s on %s (i2c-%d) done. IR unit ready.\n",
                   tx_probe ? "Tx" : "Rx", adap->name, adap->nr);