Modifying file_operations

Simon Turvey (
Thu, 13 Sep 2001 23:53:45 +0100

Warning! This might be a stupid question.

Is it safe to modify the read() entry of a driver's file_operations struct
in order to modify the behaviour of the driver depending upon some context,
say a particular hardware mode. Or is the only way to do this safely to
test the current mode in read() adding overhead to the function.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at