Re: [PATCH] Add Linux Driver for Intel Langwell Watchdog

From: Alan Cox
Date: Mon Jan 18 2010 - 17:21:32 EST


> + /* send the threshold and soft_threshold via IPC to the Lincroft */
> + reg_data.payload1 = watchdog_device.soft_threshold;
> + reg_data.payload2 = watchdog_device.threshold;
> + ipc_set_watchdog(&reg_data);

That still doesn't seem to be merged upstream - someone needs poking to
at least get an IPC driver into staging.


> + * /dev/watchdog handling
> + */
> +static int langwell_open(struct inode *inode, struct file *file)
> +{
> + /* Miscdevice structure pointer already saved in private_data */
> +
> + struct watchdog_reg_data reg_data;
> +
> + if (!capable(CAP_SYS_ADMIN))
> + return -EPERM;

File permissions will deal with that bit

> +
> + if (test_and_set_bit(0, &watchdog_device.driver_open))
> + return -ENOTTY;

EBUSY

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/