There's usually a float that rises as the water comes in and shuts off the inlet valve - the float sometimes needs to be adjusted - there's a locking nut which gets forgotten and the adjuster moves over time.
You may well need to have the valve turn off sooner so you'll need to adjust the float further into the water - screw the adjuster inwards - do up the locking nut.
Operate the mechanism several times - watch how your adjustments affect the water level. Set the level about half an inch below the overflow pipe.
Good luck...
Peccavi
March 2013